allow comments in equation, default token in equation

This commit is contained in:
Daniel Felder 2014-08-11 11:03:43 +00:00
commit 2f56fb208c

View file

@ -47,6 +47,9 @@ var LatexHighlightRules = function() {
next : "equation" next : "equation"
}], }],
"equation" : [{ "equation" : [{
token : "comment",
regex : "%.*$"
},{
token : "string", token : "string",
regex : "\\${1,2}", regex : "\\${1,2}",
next : "start" next : "start"
@ -54,8 +57,7 @@ var LatexHighlightRules = function() {
token : "constant.character.escape", token : "constant.character.escape",
regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)" regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
},{ },{
token : "string", defaultToken : "string"
regex : "."
}] }]
}; };