Skip to content

馃悶 Prevent numeric-only footnotes from spilling into adjacent notes - #211

Open
JFWooten4 wants to merge 1 commit into
mainfrom
fix/numeric-footnote-boundary-sec-2007
Open

JFWooten4 wants to merge 1 commit into
mainfrom
fix/numeric-footnote-boundary-sec-2007

Conversation

@JFWooten4

Copy link
Copy Markdown
Member

Problem

In the SEC's November 2007 Commission voting archive, PDF page 173, highlighting footnote 12 also highlights footnote 13. Note 13 starts with the calculation 6.63 脳 800 = 5,304, rather than alphabetic text. The footnote indexer's adjacent-text check only accepted letters, so it could skip the next marker and absorb its text into note 12.

Fix

  • Recognize numeric-leading text as a valid adjacent footnote body while keeping the existing marker, layout, and reference validation.
  • Preserve smaller-font arithmetic operator glyphs embedded among larger text on the same footnote line, so the calculation remains intact.
  • Add a regression in the existing footnote test suite with condensed geometry modeled on page 173. Assert that notes 12 and 13 remain separate, the calculation belongs only to note 13, note 12 highlighting stops before note 13, and the printed page number stays excluded.

Verification

  • Verified the committed tree differs from its parent and contains only the two intended modified files.
  • Compared the branch against main: one commit ahead, zero behind, with src/viewer/navigation/footnote-index.js and tests/footnote-click-copy.test.mjs changed.
  • Not run locally: the Node test suite or an interactive extension render (GitHub checkout/network access unavailable here). Run npm test and verify clicking/highlighting note 12 and note 13 separately on the source PDF.

Related work

  • #169 improved recovery of footnotes in scanned PDFs.
  • #201 added optional automatic copying of highlighted PDF text.

Recognize numeric-leading footnote definitions and retain smaller multiplication operators, so the November 2007 SEC PDF's note 12 does not absorb note 13. Add a targeted regression test for page 173.

Co-authored-by: Codex Web <noreply@openai.com>
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