Skip to content

🎨 Theme generated PDF links and recognize written URLs - #217

Open
JFWooten4 wants to merge 2 commits into
mainfrom
style/theme-generated-link-highlights-20261026
Open

JFWooten4 wants to merge 2 commits into
mainfrom
style/theme-generated-link-highlights-20261026

Conversation

@JFWooten4

@JFWooten4 JFWooten4 commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Use the viewer's selected --accent theme color for hover and keyboard-focus highlights on generated printed-contents and inferred-reference links.
  • Detect visible http:// and https:// addresses that were printed as PDF text but lack native PDF hyperlink annotations.
  • Recognize URLs spanning adjacent PDF.js text fragments, without combining separated lines or visually distant text.
  • Strip trailing sentence punctuation while retaining balanced parentheses within URLs; reject malformed URLs and non-HTTP(S) schemes.
  • Render detected URLs as real links that open in a separate tab with noopener noreferrer; keep the document's original text appearance.
  • Suppress generated URL overlays when a native PDF hyperlink annotation overlaps any portion of the URL, including fragmented URLs. Native PDF and LaTeX links remain unchanged.

Tests and verification

  • Add tests for the accent hover/focus styles and independence from native annotations.
  • Add tests for HTTP(S) recognition, punctuation, balanced parentheses, unsupported schemes, invalid URLs, fragmented text, URL boundaries, safe anchor attributes, and native-link exclusion.
  • Validated URL parsing and generated anchor behavior using isolated JS execution with mock browser geometry.
  • Verified the commit's tree differs from its parent and the expected source/test blobs are present.
  • Full repository npm test and extension build have not been run locally.

JFWooten4 and others added 2 commits October 26, 2026 17:22
Use the viewer's selected accent color for generated table-of-contents and inferred-reference link hover/focus treatments without changing native PDF hyperlinks. Add regression coverage.

Co-authored-by: Codex Web <noreply@openai.com>
Recognize visible HTTP and HTTPS addresses, including split PDF text fragments, and render them as securely opened themed anchors. Preserve native annotations, trim sentence punctuation, and add regression coverage.

Co-authored-by: Codex Web <noreply@openai.com>
@JFWooten4 JFWooten4 changed the title 🎨 Theme generated PDF hyperlink highlights 🎨 Theme generated PDF links and recognize written URLs Oct 26, 2026
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