Prune empty conditional list paragraphs after fill #61
Loading…
Reference in a new issue
No description provided.
Delete branch "prune-empty-conditional-paragraphs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
lily-cond:SDT resolves to empty, the rewritten zero-width bookmark used to leave a blank-bulleted paragraph behind in numbered lists (e.g., a stray(c)between filled rows in the HIPAA template). A newprune_empty_conditional_paragraphspost-pass runs afterupdate_sdt_v2and drops any<w:p>whose onlylily-cond:bookmark has no surrounding visible content (no non-whitespace text, no tabs/breaks/drawings/fields). Mixed paragraphs and intentionally blank spacing paragraphs are preserved.scripts/docx_utils.pyfor parity with the Python template tooling.Test plan
make test— 93 Rust tests pass, including six newtest_prune_*cases (positive prune, mixed-content kept,lily:bookmark kept, tab/break kept, multiple consecutive pruned, whitespace-no-conditional kept).make lint— no new warnings; clippy clean for changed code.(a) → (b) JANE DOE; → (c) → (d)with the empty Tertiary paragraph removed.