From b7b1bbcb9668032f6ab16766e19572745c6326b9 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Wed, 3 Apr 2024 14:56:27 +0200 Subject: [PATCH] [crystal mode] Fix an infinite loop in tokenizing of heredoc strings Closes https://github.com/codemirror/codemirror5/issues/7092 --- mode/crystal/crystal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mode/crystal/crystal.js b/mode/crystal/crystal.js index 73b0dbe13c..b22c5dbe41 100644 --- a/mode/crystal/crystal.js +++ b/mode/crystal/crystal.js @@ -379,7 +379,7 @@ return "string"; } - escaped = embed && stream.next() == "\\"; + escaped = stream.next() == "\\" && embed; } else { stream.next(); escaped = false;