mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-27 03:27:21 -06:00
CodeRabbit review on #3471: the widened baseline tolerance (half the larger run's size, for a same-row footnote marker) could also let two genuinely stacked rows of ordinary body text join into one row, if horizontal compression (Tz) narrows the first row enough to put the second row's start within it — a negative `gap` inside the existing overlap allowance, with a baseline shift inside the new 50% band but outside the original 20% one. Only take the wider tolerance when the two runs don't overlap horizontally (`gap >= 0.0`), which is true for a footnote marker drawn right after the text it follows. Overlapping runs keep the original, tighter 20% tolerance. Added stacked_rows_that_merely_overlap_do_not_join_into_one_row, confirmed it fails without this change (merges into one row/block) and passes with it. cargo test -p pdfcraft-edit (197 passed), fmt, clippy -D warnings, xtask layers and xtask assets all clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>