fix get_undeclared_template_variables() to include header/footer

This commit is contained in:
Eric Lapouyade 2020-05-11 17:55:53 +02:00
parent 01fd27df11
commit 5ee1c03410

View File

@ -609,6 +609,9 @@ class DocxTemplate(object):
def get_undeclared_template_variables(self, jinja_env=None):
xml = self.get_xml()
xml = self.patch_xml(xml)
for uri in [self.HEADER_URI, self.FOOTER_URI]:
for relKey, _xml in self.get_headers_footers_xml(uri):
xml += self.patch_xml(_xml)
if jinja_env:
env = jinja_env
else: