[bugfix] replacee strings must be escaped as well

This commit is contained in:
Yuichi Nishiwaki 2014-04-06 09:51:30 +09:00
parent 6d8680b902
commit 32f29692d9
1 changed files with 2 additions and 2 deletions

View File

@ -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')