From 2f56fb208c0465b991a098b069225a682d96acf7 Mon Sep 17 00:00:00 2001 From: Daniel Felder Date: Mon, 11 Aug 2014 11:03:43 +0000 Subject: [PATCH] allow comments in equation, default token in equation --- lib/ace/mode/latex_highlight_rules.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ace/mode/latex_highlight_rules.js b/lib/ace/mode/latex_highlight_rules.js index 06db18d8..a3345322 100644 --- a/lib/ace/mode/latex_highlight_rules.js +++ b/lib/ace/mode/latex_highlight_rules.js @@ -47,6 +47,9 @@ var LatexHighlightRules = function() { next : "equation" }], "equation" : [{ + token : "comment", + regex : "%.*$" + },{ token : "string", regex : "\\${1,2}", next : "start" @@ -54,8 +57,7 @@ var LatexHighlightRules = function() { token : "constant.character.escape", regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)" },{ - token : "string", - regex : "." + defaultToken : "string" }] };