From 3e068679d965800ff0d97abe61419e39803c0c5b Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Sat, 14 Dec 2024 09:57:26 -0500 Subject: [PATCH] fix(parser) prevent gobbling of illegal newlines (#4142) --- src/highlight.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/highlight.js b/src/highlight.js index ac44a1e115..48d792e82d 100644 --- a/src/highlight.js +++ b/src/highlight.js @@ -526,6 +526,7 @@ const HLJS = function(hljs) { // first handler (when ignoreIllegals is true) if (match.type === "illegal" && lexeme === "") { // advance so we aren't stuck in an infinite loop + modeBuffer += "\n"; return 1; }