Repository navigation
🐞 Match hyphenated PDF text across printed line breaks - #229
Merged
Merged
Conversation
Make PDF searches match words split by printed end-of-line hyphens while retaining literal hyphen and URL searches, source-aligned highlighting, and copy behavior. Co-authored-by: ChatGPT 6 <noreply@openai.com>
Cover end-of-line hyphenation, original source spans, preserved literal hyphens, URL punctuation, unrelated lines, and discretionary soft hyphens. Co-authored-by: ChatGPT 6 <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PDF search misses words hyphenated at the end of a printed line. In the GovInfo 2025 edition of 17 CFR 248.30, page 2 shows both a complete
accountandac-followed bycounton the next line. Searching foraccountshould find and highlight both.Changes
hasEOLas a discretionary line break when the following item begins with a letter.risk-based), literal in-line hyphens, and wrapped URL punctuation searchable without removing their hyphens.ac-/countsplit, literal hyphens, unrelated fragments, URL hyphens, and soft hyphens.Verification
mainonly insrc/viewer/search/search-matches.jsandtests/search-matches.test.mjs; it is two commits ahead and zero behind.Browser check
account; verify the intact occurrence and theac-/countoccurrence are both counted and highlighted.recommendto check another line-wrapped word, and search a real hyphenated word to check that literal punctuation remains supported.Related work