diff --git a/lib/ace/mode/latex_highlight_rules.js b/lib/ace/mode/latex_highlight_rules.js index 56292b7a..931534ed 100644 --- a/lib/ace/mode/latex_highlight_rules.js +++ b/lib/ace/mode/latex_highlight_rules.js @@ -12,19 +12,19 @@ var LatexHighlightRules = function() { // the end of the line token : "comment", regex : "%.*$" - },{ + }, { // Documentclass and usepackage token : ["keyword","lparen","variable.parameter","rparen", "lparen","storage.type","rparen"], regex : "(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})" - },{ + }, { // A label token : ["keyword","lparen","variable.parameter","rparen"], regex : "(\\\\label)(?:({)([^}]*)(}))?" - },{ + }, { // A block token : ["storage.type", "lparen","variable.parameter","rparen"], regex : "(\\\\(?:begin|end))({)(\\w*)(})" - },{ + }, { // A tex command e.g. \foo token : "storage.type", regex : "\\\\[a-zA-Z]+" @@ -36,11 +36,11 @@ var LatexHighlightRules = function() { // Curly and square braces token : "rparen", regex : "[\\])}]" - },{ + }, { // Escaped character (including new line) token : "constant.character.escape", regex : "\\\\[^a-zA-Z]?" - },{ + }, { // An equation token : "string", regex : "\\${1,2}", @@ -49,18 +49,18 @@ var LatexHighlightRules = function() { "equation" : [{ token : "comment", regex : "%.*$" - },{ + }, { token : "string", regex : "\\${1,2}", next : "start" - },{ + }, { token : "constant.character.escape", regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)" - },{ + }, { token : "error", regex : "^\\s*$", next : "start" - },{ + }, { defaultToken : "string" }]