From 34df8edd2c69e8b096a36e1473aa6ca18c2ee92b Mon Sep 17 00:00:00 2001 From: ralph Date: Mon, 25 Mar 2013 12:07:48 -0400 Subject: [PATCH] BUG10870 - "A better trigger editor is needed" error: The current trigger editor has no syntax check Sol: Using CodeMirror as well as XMl editor, will give trigger editor the feature that it needs. + removing auto tabs at code begin. --- gulliver/js/codemirror/contrib/php/js/parsephp.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gulliver/js/codemirror/contrib/php/js/parsephp.js b/gulliver/js/codemirror/contrib/php/js/parsephp.js index 7d0ad1f3b..4280ee9b7 100755 --- a/gulliver/js/codemirror/contrib/php/js/parsephp.js +++ b/gulliver/js/codemirror/contrib/php/js/parsephp.js @@ -77,7 +77,11 @@ var PHPParser = Editor.Parser = (function() { function indentPHP(lexical) { return function(firstChars) { var firstChar = firstChars && firstChars.charAt(0), type = lexical.type; - var closing = firstChar == type; + if (type == "block") { + var closing = true; + } else { + var closing = firstChar == type; + } if (type == "form" && firstChar == "{") return lexical.indented; else if (type == "stat" || type == "form")