From 02ea26c0d0e4cf29ec05490a80d6ee3f79f5c3ef Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Sun, 7 Apr 2013 13:18:42 +0200 Subject: [PATCH] [javascript mode] Tokenize leading whitespace in block comments as comment Closes #1431 --- mode/javascript/javascript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mode/javascript/javascript.js b/mode/javascript/javascript.js index 89f1220369..cf3a5f003c 100644 --- a/mode/javascript/javascript.js +++ b/mode/javascript/javascript.js @@ -402,7 +402,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { state.lexical.align = false; state.indented = stream.indentation(); } - if (stream.eatSpace()) return null; + if (state.tokenize != jsTokenComment && stream.eatSpace()) return null; var style = state.tokenize(stream, state); if (type == "comment") return style; state.lastType = type;