Skip to content

Commit d867743

Browse files
committed
[clike mode] Fix parsing a comment after an operator
Closes codemirror#3864
1 parent a448b97 commit d867743

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/clike/clike.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
100100
}
101101
}
102102
if (isOperatorChar.test(ch)) {
103-
stream.eatWhile(isOperatorChar);
103+
while (!stream.match(/^\/[\/*]/, false) && stream.eat(isOperatorChar)) {}
104104
return "operator";
105105
}
106106
stream.eatWhile(/[\w\$_\xa1-\uffff]/);

0 commit comments

Comments
 (0)