Skip to content

Preserve complete tight table grids with their captions - #229

Merged
silverstein merged 2 commits into
masterfrom
fix/table-grid-boundaries-20261020
Oct 20, 2026
Merged

silverstein merged 2 commits into
masterfrom
fix/table-grid-boundaries-20261020

Conversation

@silverstein

@silverstein silverstein commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Complete tables with tightly spaced rows could remain flattened because a text box's top edge matched two adjacent rows. A caption in the same text run also caused an otherwise complete grid to be rejected.

The optional allow_headerless_tables renderer now checks the complete text height and can retain one explicit leading Table caption outside the grid. It preserves the caption as text and emits the complete grid as escaped HTML data cells. The option uses renderer 1.23.0. Default renderer 1.21.0 and established header-evidenced GFM matching keep their previous behavior.

Validation:

  • Darwin arm64, Node 22.23.2: 197 tests passed across Markdown, real MCP conversion, source/share contract and current-schema regeneration; 31 historical-evidence cases skipped.
  • Six new regression cases plus a GFM-preservation control cover tight rows, reversed PDF painting order, caption retention, overlapping captions, ordinary prose and crossed rows. A generated PDF also passes through the real MCP tool.
  • A retained external table page now preserves one 5-by-7 grid with all 35 cells. Its default conversion envelope is identical to the pre-change control. The second, ambiguous table remains unconverted. No corpus PDF is committed and no full-corpus score is claimed.
  • Independent review passed and rejected missing/competing rectangles, crossed rows, duplicate items and a non-caption replacement. Source/share mirrors and contract fingerprints agree.

Header roles remain uncertain and explicitly reported. Incomplete, overlapping and ambiguous cell geometry still refuses conversion. No OCR, model, dependency, release or installation change is included.

CI follow-up: the initial full run found stale validator source hashes in the current layout-occurrence oracle. Commit 681c700 updates only source hash/size bindings, not any of its eight cases or expected facts. All 20 affected scorer, evidence and generation-verifier checks passed on Darwin arm64; independent fixture review passed. Fresh full CI 39493209802 supersedes the failed run.

@silverstein
silverstein merged commit 2da1dcf into master Oct 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant