Skip to content

🔩 Copy complete footnotes on Markdown-enabled reference clicks - #189

Merged
JFWooten4 merged 2 commits into
mainfrom
copy-clicked-footnotes-as-markdown-20261016
Oct 16, 2026
Merged

JFWooten4 merged 2 commits into
mainfrom
copy-clicked-footnotes-as-markdown-20261016

Conversation

@JFWooten4

Copy link
Copy Markdown
Member

Summary

  • When Copy selection as Markdown is enabled, clicking an inline footnote reference continues to navigate to and highlight the footnote, and additionally copies the complete recovered footnote text to the clipboard as a Markdown definition ([^12]: …).
  • Reuses the viewer's recovered footnote index, including continuations across pages, and shares escaping with ordinary Markdown selection copying.
  • Keeps the clipboard unchanged when Markdown copying is disabled, when navigating via the footnote toolbar or document scrubber, or when no extractable note text exists. Displays a clear toast for success or clipboard failures.
  • Updates the setting tooltip to explain the click-to-copy behavior.

Tests

Adds tests/footnote-click-copy.test.mjs to the npm test script, covering Markdown serialization, enabled/disabled modes, toolbar behavior, unavailable text, and clipboard errors.

Scope

Uses the existing visual footnote highlight for navigation. The clipboard copies the complete indexed footnote, including text that may not currently be rendered in the PDF text layer; this does not create a persistent native DOM text selection.

JFWooten4 and others added 2 commits October 16, 2026 12:11
Copy complete indexed footnote definitions when an inline footnote reference is clicked with Markdown copying enabled. Preserve navigation and existing highlight behavior, leave manual and scrubber navigation unchanged, and add clipboard/error regression tests.

Co-authored-by: Codex Web <noreply@openai.com>
Reconcile clicked-footnote Markdown copying with the selected changes already squashed into main. Preserve styled footnote selection from #187 and keep both #188 and #189 regression tests registered without discarding any prior changes.

Co-authored-by: Codex Web <noreply@openai.com>
@JFWooten4
JFWooten4 merged commit 1773f9d into main Oct 16, 2026
1 check failed
@JFWooten4
JFWooten4 deleted the copy-clicked-footnotes-as-markdown-20261016 branch October 16, 2026 19:41
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