Skip to content

Commit 860464f

Browse files
committed
fix Misparsed Escaped Quotes
1 parent 3420c5e commit 860464f

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

scripts/check-redirects-on-rename.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -275,16 +275,6 @@ function extractStringValue(
275275
if (i + 1 < content.length) {
276276
const nextChar = content[i + 1];
277277

278-
// Special case: \\" should be parsed as \" (escaped quote)
279-
// In JavaScript: \\ escapes the backslash, \" escapes the quote
280-
// So \\" becomes \" (backslash + quote) in the string value
281-
if (nextChar === '\\' && i + 2 < content.length && content[i + 2] === quoteChar) {
282-
// This is \\" which should be parsed as \" (escaped quote)
283-
value += '\\' + quoteChar;
284-
i += 3;
285-
continue;
286-
}
287-
288278
// Handle escaped quote, backslash, and other escape sequences
289279
if (nextChar === quoteChar || nextChar === '\\') {
290280
value += char + nextChar;

0 commit comments

Comments
 (0)