Skip to content

Fix escaped Jinja delimiters split across Word runs - #170

Open
cvas22 wants to merge 1 commit into
mainfrom
port/upstream-662
Open

cvas22 wants to merge 1 commit into
mainfrom
port/upstream-662

Conversation

@cvas22

@cvas22 cvas22 commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Port of elapouya/python-docx-template#662 by @CAOShurong, which has been waiting upstream (fixes elapouya/python-docx-template#548). The commit keeps @CAOShurong as the author.

The only changes are the move from docxtpl/ to docform/ and the import name. No changes besides the path.

The unit tests and the new script in tests/ pass locally.

Join only the four supported escaped Jinja delimiter tokens when Word has divided their characters into separate runs. Keep matching within one paragraph and add regression coverage for single-run, split-run, and false-positive cases.

Assisted-by: OpenAI Codex <noreply@openai.com>
Signed-off-by: CAOShurong <170531907+CAOShurong@users.noreply.github.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Escaping delimiters cannot render properly

2 participants