From e0f145bf190cf1be3390d480e191ed4a29ec3a5f Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Sun, 20 Oct 2024 16:09:38 -0400 Subject: [PATCH] fix(parser) prevent gobbling of illegal newlines --- 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; }