Skip to content

Commit

Permalink
Fix an infinite loop in Crystal heredoc tokenizing
Browse files Browse the repository at this point in the history
FIX: Fix an infinite loop when tokenizing heredoc strings in the Crystal mode.

Closes codemirror/codemirror5#7092
  • Loading branch information
marijnh committed Apr 3, 2024
1 parent 48c56cf commit 9ac2311
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mode/crystal.js
Expand Up @@ -365,7 +365,7 @@ function tokenHereDoc(phrase, embed) {
return "string";
}

escaped = embed && stream.next() == "\\";
escaped = stream.next() == "\\" && embed;
} else {
stream.next();
escaped = false;
Expand Down

0 comments on commit 9ac2311

Please sign in to comment.