Skip to content

Commit 930c02f

Browse files
committed
[javascript mode] Fix tokenizing of ++ and --
1 parent 53aa6c3 commit 930c02f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mode/javascript/javascript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
141141
if (ch != ">" || !state.lexical || state.lexical.type != ">") {
142142
if (stream.eat("=")) {
143143
if (ch == "!" || ch == "=") stream.eat("=")
144-
} else if (ch == "<" || ch == ">" || ch == "*") {
144+
} else if (/[<>*+\-]/.test(ch)) {
145145
stream.eatWhile(ch);
146146
}
147147
}

0 commit comments

Comments
 (0)