Skip to content

Commit 3e06867

Browse files
authored
fix(parser) prevent gobbling of illegal newlines (#4142)
1 parent aaa57e9 commit 3e06867

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/highlight.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@ const HLJS = function(hljs) {
526526
// first handler (when ignoreIllegals is true)
527527
if (match.type === "illegal" && lexeme === "") {
528528
// advance so we aren't stuck in an infinite loop
529+
modeBuffer += "\n";
529530
return 1;
530531
}
531532

0 commit comments

Comments
 (0)