Files
pdfcraft/crates
e7ba974fe1 Edit text: a rewritten paragraph keeps its place in the text object it shares (#7)
* Edit text: a rewritten paragraph keeps its place in the text object it shares

A rewritten paragraph was drawn again just before the BT of its text object. When earlier
paragraphs shared that BT … ET (as in text-only pages), the paragraph moved ahead of them in
the content: reading order changed (screen readers, copy, `pdftotext -raw`) and text_paragraphs
renumbered, so after text_edit paragraph 2 a following text_edit paragraph 1 rewrote the
already edited paragraph instead of the first one. The text object is now split where the
paragraph was, and the second half resumes from the same line matrix and text state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Edit text: read the text before a paragraph without slicing by input positions (never-panic rule)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Edit text: test a recoloured paragraph in a shared text object (split + q/Q together)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: storybored379 <storybored379@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-04 14:00:31 -04:00
..
2026-09-30 11:00:02 -04:00
2026-09-30 05:17:08 -04:00