Skip to content

Escaping delimiters cannot render properly #548

Open
cvas22/docform
#170

Description

@trouver

Escaping delimiters cannot be rendered correctly in the docx template under certain circumstances.

Test case

from docxtpl import DocxTemplate


def docxtpl_test():
    tpl = DocxTemplate('escaping_delimiters_test_tpl.docx')
    content = {}
    tpl.render(content)
    tpl.save('escaping_delimiters_test_res.docx')


if __name__ == '__main__':
    docxtpl_test()

docx template

escaping_delimiters_test_tpl.docx

Local test results

tpl_and_res

Local test environment

OS: Windows 10
python version: python 3.10.9
docxtpl version: 0.17.0

Activity

  1. cvas22 commented on Nov 22, 2026

    @cvas22

    @trouver @CAOShurong fyi, this is fixed in Docform (the maintained fork at https://github.com/cvas22/docform, docform on PyPI) via cvas22/docform#170 and cvas22/docform#174, based on #662. Escaped delimiters split across runs render correctly there, including the template from this issue. It'll be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions