Skip to content

Commit

Permalink
Code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
elapouya committed Jul 21, 2024
1 parent a50b52b commit ac38610
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docxtpl/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,9 @@ def render_xml_part(self, src_xml, part, context, jinja_env=None):
line_number = max(exc.lineno - 4, 0)
exc.docx_context = map(
lambda x: re.sub(r"<[^>]+>", "", x),
src_xml.splitlines()[line_number : (line_number + 7)],
src_xml.splitlines()[line_number:(line_number + 7)],
)

raise exc
dst_xml = re.sub(r"\n<w:p([ >])", r"<w:p\1", dst_xml)
dst_xml = (
Expand Down

0 comments on commit ac38610

Please sign in to comment.