Repository navigation
Preserve tabs and line breaks between escaped delimiter characters - #174
Conversation
cvas22
left a comment
There was a problem hiding this comment.
Thx for porting this. The tab/br fix works, but the new allowlist also stops joining across w:proofErr, bookmarks and w:lastRenderedPageBreak, which Word adds all the time, so }_} with a spell-check marker in the middle renders literally now. Could you keep the old paragraph-wide gap and just exclude w:tab/w:br/w:cr, plus add a proofErr case to the test?
|
Restored the paragraph-wide match in 23dc421. Proofing marks, bookmarks, and last-rendered page breaks can sit inside a delimiter again. Tabs, breaks, and carriage returns still interrupt it. The new regression saves and renders a Word document with a spell-check range around the underscore. |
Port the rendering fix from elapouya/python-docx-template#662 (0a32c4b8).
23dc421 to
484c859
Compare
cvas22
left a comment
There was a problem hiding this comment.
Thx, this looks good now. Proofing marks and bookmarks join again and tabs/breaks still stop it.
This follows #170 and ports the correction from elapouya/python-docx-template#662. On
main, a Word tab or manual line break between}and_}disappears during rendering, turning the text into}}. The change preserves the separator and still renders adjacent characters across differently formatted runs.The new test saves and reopens a Word document for all three cases. All 36 unit tests and 37 example scripts passed locally. The original document attached to #115 also renders all four escaped delimiters correctly.