Skip to content
Snippets Groups Projects
Commit 3fc35eb1 authored by ks-ifware's avatar ks-ifware Committed by Marijn Haverbeke
Browse files

Indentation bug fix related to multi-line comments and multi-line strings. ...

Indentation bug fix related to multi-line comments and multi-line strings.  Previously if a multi-line comment or string contained the word 'end', it would throw off the indentation level for all following code.
parent c952d078
No related branches found
No related tags found
No related merge requests found
......@@ -123,8 +123,10 @@ CodeMirror.defineMode("lua", function(config, parserConfig) {
else if (builtins.test(word)) style = "builtin";
else if (specials.test(word)) style = "variable-2";
}
if (indentTokens.test(word)) ++state.indentDepth;
else if (dedentTokens.test(word)) --state.indentDepth;
if ((style != "lua-comment") && (style != "lua-string")){
if (indentTokens.test(word)) ++state.indentDepth;
else if (dedentTokens.test(word)) --state.indentDepth;
}
return style;
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment