diff --git a/CHANGES.rst b/CHANGES.rst index 71bff4a..933bd44 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +0.1.6 (2015-05-11) +------------------ +- remove debug code +- add lxml dependency + 0.1.5 (2015-05-11) ------------------ - fix template filter with quote diff --git a/docxtpl/__init__.py b/docxtpl/__init__.py index 2147901..5b86a17 100644 --- a/docxtpl/__init__.py +++ b/docxtpl/__init__.py @@ -5,7 +5,7 @@ Created : 2015-03-12 @author: Eric Lapouyade ''' -__version__ = '0.1.5' +__version__ = '0.1.6' from lxml import etree from docx import Document @@ -53,7 +53,7 @@ class DocxTemplate(object): # This is mandatory to have jinja2 generating correct xml code pat = r'](?:(?!]).)*({%%|{{)%(y)s ([^}%%]*(?:%%}|}})).*?' % {'y':y} src_xml = re.sub(pat, r'\1 \2',src_xml,flags=re.DOTALL) - + src_xml = src_xml.replace(r"‘","'") return src_xml diff --git a/setup.py b/setup.py index 4a81c34..20816c8 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ News """ % read('README', 'CHANGES') setup(name='docxtpl', - version='0.1.5', + version='0.1.6', description='Python docx template engine', long_description=long_description, classifiers=[ @@ -39,6 +39,6 @@ setup(name='docxtpl', author_email='elapouya@gmail.com', license='LGPL 2.1', packages=['docxtpl'], - install_requires = ['Sphinx<1.3b', 'sphinxcontrib-napoleon', 'python-docx','jinja2'], + install_requires = ['Sphinx<1.3b', 'sphinxcontrib-napoleon', 'python-docx','jinja2', 'lxml'], eager_resources = ['docs'], zip_safe=False) diff --git a/tests/test_files/cellbg.docx b/tests/test_files/cellbg.docx index 2512c6b..6062c80 100644 Binary files a/tests/test_files/cellbg.docx and b/tests/test_files/cellbg.docx differ diff --git a/tests/test_files/order.docx b/tests/test_files/order.docx index 30b4e10..f054a55 100644 Binary files a/tests/test_files/order.docx and b/tests/test_files/order.docx differ diff --git a/tests/test_files/richtext.docx b/tests/test_files/richtext.docx index d100cf6..f1b9149 100644 Binary files a/tests/test_files/richtext.docx and b/tests/test_files/richtext.docx differ