diff --git a/docxtpl/template.py b/docxtpl/template.py index 8be23ea..1054792 100644 --- a/docxtpl/template.py +++ b/docxtpl/template.py @@ -211,7 +211,7 @@ class DocxTemplate(object): return src_xml def render_xml_part(self, src_xml, part, context, jinja_env=None): - src_xml = src_xml.replace(r'', '\n') + src_xml = re.sub(r'])', r'\n]+>', '', x), src_xml.splitlines()[line_number:(line_number + 7)]) raise exc - dst_xml = dst_xml.replace('\n', '') + dst_xml = re.sub(r'\n])', r'