Skip to content

Commit 02ea26c

Browse files
committed
[javascript mode] Tokenize leading whitespace in block comments as comment
Closes #1431
1 parent 3bc8919 commit 02ea26c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/javascript/javascript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
402402
state.lexical.align = false;
403403
state.indented = stream.indentation();
404404
}
405-
if (stream.eatSpace()) return null;
405+
if (state.tokenize != jsTokenComment && stream.eatSpace()) return null;
406406
var style = state.tokenize(stream, state);
407407
if (type == "comment") return style;
408408
state.lastType = type;

0 commit comments

Comments
 (0)