Commit be1d2f0d authored by Stefan Behnel's avatar Stefan Behnel

fix regex for CSTRING() template replacement in the case where double quotes appear in the string

parent 604a770a
......@@ -454,7 +454,7 @@ class UtilityCode(UtilityCodeBase):
'"%s\\n"\n' % line if not line.endswith('\\') or line.endswith('\\\\') else '"%s"\n' % line[:-1]
for line in content.splitlines())
impl = re.sub(r'CSTRING\(\s*"""([^"]+|"[^"])"""\s*\)', split_string, impl)
impl = re.sub(r'CSTRING\(\s*"""([^"]*(?:"[^"]+)*)"""\s*\)', split_string, impl)
assert 'CSTRING(' not in impl
return impl
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment