mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-08 12:02:28 +00:00
Clear all wrote `/Annots []` on a page that had no annotations and replaced an indirect `/Annots` array with an inline copy. It also left replies to a mark in place, so their `/IRT` kept the cleared mark in the document (and in the comment list, as a reply to nothing). `clear_marks` now writes the list through the annot crate's `set_annots` (made public), as deleting a comment does, and removes each mark's replies and pop-ups with it. The "what goes with a deleted comment" walk moves from `delete_annotation` into `with_replies_and_popups`, which both use; it visits each annotation once instead of sweeping the list until nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>