Handle escaped characters in strings
All checks were successful
timw4mail/scroll/pipeline/head This commit looks good

This commit is contained in:
Timothy Warren 2024-07-16 16:03:28 -04:00
parent b5856f063a
commit 32e3676b02

View File

@ -270,6 +270,14 @@ export class Row {
if (syntax.flags.strings) { if (syntax.flags.strings) {
if (inString) { if (inString) {
highlighting.push(HighlightType.String); highlighting.push(HighlightType.String);
// Handle escaped characters in strings
if (ch === '\\' && i < this.rsize + 1) {
highlighting.push(HighlightType.String);
i += 2;
continue;
}
if (ch === inString) { if (ch === inString) {
inString = false; inString = false;
} }