Files
pdfcraft/parity
KenM76andClaude Opus 5.5 705d862328 fix(edit): check revealed OCR text where the rewrite lands
The on-top trigger compared later paint with the paragraph's old box. A
rewrite that is moved (BlockStyle::offset), rewrapped wider or grown to
more lines can land under an image the old box is clear of, and stayed
underneath it. Both rewrite paths now test a Reach: the old box (where
the cover goes) plus the moved box grown to the wrap width either way
and down to the drawn line count (the widest measured line when wider), and
up by one line pitch for a larger size; turned text grows by the lines'
diagonal; any non-finite number makes it unbounded. Over-reaching is
harmless: the cover still fills only the old box. The parity notes say
so.

Tests: an_ocr_rewrite_goes_on_top_of_paint_over_where_it_lands (move,
width and line growth, both paths) and a_rewrites_reach_covers_its_move_
width_and_lines. Seen failing with each path reverted to the old box and
with growth zeroed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-30 02:12:01 -04:00
..