cleanup
This commit is contained in:
parent
b8c111b832
commit
917c4da39d
1 changed files with 10 additions and 10 deletions
|
|
@ -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"
|
||||
}]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue