Fixed bug #12527: t3editor/codecompletion: parser error on brackets on the right...
authorTobias Liebig <mail@etobi.de>
Sat, 14 Nov 2009 10:45:48 +0000 (10:45 +0000)
committerTobias Liebig <mail@etobi.de>
Sat, 14 Nov 2009 10:45:48 +0000 (10:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6413 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/t3editor/jslib/ts_codecompletion/tsparser.js

index dd026ca..829ab6c 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * Fixed bug #12522: t3editor/codecompletion: tsref properties get listed twice when they are defined
        * Fixed bug #12523: t3editor/codecompletion: Gifbuilder TEXT and Gifbuilder IMAGE inside of GMENU_itemState
+       * Fixed bug #12527: t3editor/codecompletion: parser error on brackets on the right side of an operator
 
 2009-11-13  Francois Suter  <francois@typo3.org>
 
index 6809ffc..87515df 100644 (file)
@@ -247,9 +247,13 @@ var TsParser = function(tsRef,extTsObjTree){
                                        ignoreLine = true;
                                }
                                if (node == '}') {
-                                       stack.popIfLastElementEquals('{');
-                                       if (prefixes.length>0) prefixes.pop();
-                                       ignoreLine = true;
+                                       //no characters except whitespace allowed before closing bracket
+                                       trimmedLine = line.replace(/\s/g,"");
+                                       if (trimmedLine=="") {
+                                               stack.popIfLastElementEquals('{');
+                                               if (prefixes.length>0) prefixes.pop();
+                                               ignoreLine = true;
+                                       }
                                }
                                if (!stack.lastElementEquals('#')) {
                                        line += node;