mirror of
https://github.com/alecthomas/chroma.git
synced 2025-03-19 21:10:15 +02:00
Fix JS second part of division expression
This commit is contained in:
parent
1a22fed4bd
commit
8fd401fe83
@ -23,7 +23,6 @@ var JavascriptRules = Rules{
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
{`\A#! ?/.*?\n`, CommentHashbang, nil},
|
{`\A#! ?/.*?\n`, CommentHashbang, nil},
|
||||||
{`^(?=\s|/|<!--)`, Text, Push("slashstartsregex")},
|
|
||||||
Include("commentsandwhitespace"),
|
Include("commentsandwhitespace"),
|
||||||
{`(\.\d+|[0-9]+\.[0-9]*)([eE][-+]?[0-9]+)?`, LiteralNumberFloat, nil},
|
{`(\.\d+|[0-9]+\.[0-9]*)([eE][-+]?[0-9]+)?`, LiteralNumberFloat, nil},
|
||||||
{`0[bB][01]+`, LiteralNumberBin, nil},
|
{`0[bB][01]+`, LiteralNumberBin, nil},
|
||||||
@ -32,6 +31,7 @@ var JavascriptRules = Rules{
|
|||||||
{`[0-9]+`, LiteralNumberInteger, nil},
|
{`[0-9]+`, LiteralNumberInteger, nil},
|
||||||
{`\.\.\.|=>`, Punctuation, nil},
|
{`\.\.\.|=>`, Punctuation, nil},
|
||||||
{`\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?`, Operator, Push("slashstartsregex")},
|
{`\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?`, Operator, Push("slashstartsregex")},
|
||||||
|
{`^(?=\s|/|<!--)`, Text, Push("slashstartsregex")},
|
||||||
{`[{(\[;,]`, Punctuation, Push("slashstartsregex")},
|
{`[{(\[;,]`, Punctuation, Push("slashstartsregex")},
|
||||||
{`[})\].]`, Punctuation, nil},
|
{`[})\].]`, Punctuation, nil},
|
||||||
{`(for|in|while|do|break|return|continue|switch|case|default|if|else|throw|try|catch|finally|new|delete|typeof|instanceof|void|yield|this|of|class|const|debugger|export|extends|import|super)\b`, Keyword, Push("slashstartsregex")},
|
{`(for|in|while|do|break|return|continue|switch|case|default|if|else|throw|try|catch|finally|new|delete|typeof|instanceof|void|yield|this|of|class|const|debugger|export|extends|import|super)\b`, Keyword, Push("slashstartsregex")},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user