fix: backtick quote escaping (#871)

This commit is contained in:
Vicente Filho
2025-08-12 17:19:09 -03:00
committed by GitHub
parent 1fb2878271
commit 53c6b6dcb1

View File

@@ -27,7 +27,7 @@ export function escapeWithQuotes(text: string, char: string = '\'') {
if (char === '"')
return char + escapedText.replace(/["]/g, '\\"') + char;
if (char === '`')
return char + escapedText.replace(/[`]/g, '`') + char;
return char + escapedText.replace(/[`]/g, '\\`') + char;
throw new Error('Invalid escape char');
}