fix: separator change add too many backslash (#9949)

This commit is contained in:
Joel
2024-10-28 18:01:33 +08:00
committed by GitHub
parent 4da0b70694
commit 81d4d8cea1

View File

@@ -3,7 +3,7 @@ function escape(input: string): string {
return ''
const res = input
.replaceAll('\\', '\\\\')
// .replaceAll('\\', '\\\\') // This would add too many backslashes
.replaceAll('\0', '\\0')
.replaceAll('\b', '\\b')
.replaceAll('\f', '\\f')