From 32f29692d9718fe3db98ce1c9e25cefbc84e5b16 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 6 Apr 2014 09:51:30 +0900 Subject: [PATCH] [bugfix] replacee strings must be escaped as well --- etc/libemb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/libemb.py b/etc/libemb.py index 38ec9482..34e28bf3 100644 --- a/etc/libemb.py +++ b/etc/libemb.py @@ -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')