Skip to content

Commit 9d9cb0e

Browse files
committed
Fix tokenizing of three + chars in a row
Issue codemirror#5016
1 parent 930c02f commit 9d9cb0e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

mode/javascript/javascript.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
142142
if (stream.eat("=")) {
143143
if (ch == "!" || ch == "=") stream.eat("=")
144144
} else if (/[<>*+\-]/.test(ch)) {
145-
stream.eatWhile(ch);
145+
stream.eat(ch)
146+
if (ch == ">") stream.eat(ch)
146147
}
147148
}
148149
return ret("operator", "operator", stream.current());

0 commit comments

Comments
 (0)