1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-03-17 20:58:08 +02:00

Fix JS second part of division expression

This commit is contained in:
Jos512 2019-02-02 08:10:41 +01:00 committed by Alec Thomas
parent 1a22fed4bd
commit 8fd401fe83

View File

@ -23,7 +23,6 @@ var JavascriptRules = Rules{
},
"root": {
{`\A#! ?/.*?\n`, CommentHashbang, nil},
{`^(?=\s|/|<!--)`, Text, Push("slashstartsregex")},
Include("commentsandwhitespace"),
{`(\.\d+|[0-9]+\.[0-9]*)([eE][-+]?[0-9]+)?`, LiteralNumberFloat, nil},
{`0[bB][01]+`, LiteralNumberBin, nil},
@ -32,6 +31,7 @@ var JavascriptRules = Rules{
{`[0-9]+`, LiteralNumberInteger, nil},
{`\.\.\.|=>`, Punctuation, nil},
{`\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?`, Operator, Push("slashstartsregex")},
{`^(?=\s|/|<!--)`, Text, Push("slashstartsregex")},
{`[{(\[;,]`, Punctuation, Push("slashstartsregex")},
{`[})\].]`, 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")},