adjustments to latex mode

This commit is contained in:
Daniel Felder 2014-08-10 00:29:39 +00:00
commit b8f135a37d

View file

@ -11,16 +11,18 @@ var LatexHighlightRules = function() {
token : "keyword",
regex : "\\\\(documentclass|usepackage|label)"
},{
// Escaped character (including new line)
token : "constant.character.escape",
regex : "\\\\{2}"
regex : "\\\\[^a-zA-Z]"
},{
// A block
token : "storage.type",
regex : "\\\\(:?begin|end)",
next : "block"
},{
// A tex command e.g. \foo
token : "storage.type",
regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
regex : "\\\\[a-zA-Z\\d]+"
}, {
// Curly and square braces
token : "lparen",