fix(rtf): omit text of deleted revisions
Fixes the RTF part of #202. The DOC part is #174; DOCX is untouched.
Problem
RTF tracked deletions (\deleted) were printed as live text. The parties agreed {\deleted OLDTERM }{\revised NEWTERM }terms. rendered as The parties agreed OLDTERM NEWTERM terms., so both the old and the new wording appeared.
Change
\deleted (and \deleted0) now sets a group-scoped deleted flag on the character state. Body text under that flag is left out. Pending bytes are flushed before the flag changes, so text on either side of the toggle keeps its own state. Insertions (\revised) stay as before.
Verification
- New test
deleted_revision_text_is_omittedcovers both forms: a group-scoped deletion and an inline\deleted ... \deleted0. It fails on main and passes with the change. cargo test: all suites pass.rustfmt --checkon the changed file: clean.
š¤ Generated with Claude Code
Summary by cubic
Fixes the RTF part of #202: tracked deletions (\deleted) were rendered as live text, so both old and new wording of a revised clause appeared. Deleted text ā including line breaks, pictures, and equations ā is now omitted from the output, and a deleted paragraph mark joins its paragraphs and drops its list marker instead of leaving a blank line; insertions (\revised) stay as before.
- Adds regression tests covering group-scoped, inline, and element-containing
\deletedforms, deleted paragraphs, and code-block output.