Commit 3f0a44d8 authored by Jérome Perrin's avatar Jérome Perrin

Formulator: Update OOoEscaper for python3 re.sub behavior

parent 09fec26d
......@@ -72,7 +72,7 @@ class OOoEscaper:
self.parent_node = parent_node
def __call__(self, match_object):
match_value = match_object.group(1)
if match_value is None:
if match_value is None and match_object.group(2):
self.parent_node.text = convert_to_xml_compatible_string(match_object.group(2))
elif match_value == '\n':
line_break = SubElement(self.parent_node, '{%s}%s' % (TEXT_URI, 'line-break'))
......
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