[bugfix] replacee strings must be escaped as well
This commit is contained in:
+2
-2
@@ -20,8 +20,8 @@ def escape_scm(infn, outfn, vname):
|
||||
for line in input:
|
||||
output.write('"')
|
||||
line = line.strip('\n')
|
||||
line = re.sub('\\\\', '\\\\', line)
|
||||
line = re.sub('\"', '\\"', line)
|
||||
line = re.sub(r'\\', r'\\\\', line)
|
||||
line = re.sub(r'"', r'\"', line)
|
||||
output.write(line)
|
||||
output.write('\\n"\n')
|
||||
output.write(';\n\n')
|
||||
|
||||
Reference in New Issue
Block a user