Skip to content

Commit

Permalink
[javascript mode] Reduce start-of-line restriction to HTML close comm…
Browse files Browse the repository at this point in the history
…ent tokens

Issue #6305
  • Loading branch information
marijnh committed Jun 5, 2020
1 parent b074875 commit 84a02bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mode/javascript/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
return ret("meta", "meta");
} else if (ch == "#" && stream.eatWhile(wordRE)) {
return ret("variable", "property")
} else if ((ch == "<" && stream.match("!--") || ch == "-" && stream.match("->")) &&
!/\S/.test(stream.string.slice(0, stream.start))) {
} else if (ch == "<" && stream.match("!--") ||
(ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start)))) {
stream.skipToEnd()
return ret("comment", "comment")
} else if (isOperatorChar.test(ch)) {
Expand Down

0 comments on commit 84a02bc

Please sign in to comment.