diff --git a/docxtpl/__init__.py b/docxtpl/__init__.py index 51c1646..b4a1b8d 100644 --- a/docxtpl/__init__.py +++ b/docxtpl/__init__.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -''' +""" Created : 2015-03-12 @author: Eric Lapouyade -''' +""" __version__ = '0.11.0' import functools @@ -249,14 +249,14 @@ class DocxTemplate(object): run_properties = re.search(r'.*', m[0]) run_properties = run_properties[0] if run_properties else '' - p_resolve_text = lambda x:resolve_text(run_properties, paragraph_properties, x) + p_resolve_text = lambda x: resolve_text(run_properties, paragraph_properties, x) return re.sub(r']*)?>.*?', p_resolve_text, m[0], flags=re.DOTALL) def resolve_paragraph(m): paragraph_properties = re.search(r'.*', m[0]) paragraph_properties = paragraph_properties[0] if paragraph_properties else '' - p_resolve_run = lambda x:resolve_run(paragraph_properties, x) + p_resolve_run = lambda x: resolve_run(paragraph_properties, x) return re.sub(r']*)?>.*?', p_resolve_run, m[0], flags=re.DOTALL) diff --git a/tests/escape.py b/tests/escape.py index 865d693..1559a11 100644 --- a/tests/escape.py +++ b/tests/escape.py @@ -13,7 +13,7 @@ context = { 'the listing\nwith\nsome\nlines\nand special chars : <>& ...' ), 'page_break': R('\f'), - 'new_listing':""" + 'new_listing': """ This is a new listing Now, does not require Listing() Object Here is a \t tab\a