feat(footnotes): add back-to-reference link for footnotes (#2699)#2738
feat(footnotes): add back-to-reference link for footnotes (#2699)#2738arshinsikka wants to merge 3 commits intoMarkBind:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request re-enables the footnote back-to-reference link feature in MarkBind, allowing users to click a "↩" link in footnote definitions to jump back to the original reference marker.
- Re-enables the previously disabled back-to-reference link in footnote rendering
- Updates User Guide documentation to explain the footnote back-link feature
- Adds a manual functional test to verify the back-link functionality
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/core/src/lib/markdown-it/plugins/markdown-it-footnotes.js | Re-enables the footnote anchor rendering to include back-to-reference links |
| packages/cli/test/functional/test_site/index.md | Adds manual test case for footnote back-link functionality |
| docs/userGuide/syntax/footnotes.md | Documents the footnote back-link feature in the User Guide |
| ```html | ||
| Here is a footnote reference,[^1] | ||
|
|
||
| [^1]: This is the footnote. <a href="#fnref1" class="footnote-backref">↩</a> |
There was a problem hiding this comment.
The HTML example shows raw HTML output but doesn't demonstrate the markdown syntax that produces this result. Consider showing both the markdown input and the rendered HTML output to be clearer.
| Each footnote definition now includes a back-to-reference link (“↩”) | ||
| that jumps back to the original marker. | ||
|
|
||
| **Rendered HTML example:** |
There was a problem hiding this comment.
The section title 'Rendered HTML example' is misleading as it shows markdown syntax on line 43, not just HTML. Consider changing to 'Example:' or 'Markdown and HTML example:' for accuracy.
| **Rendered HTML example:** | |
| **Markdown and HTML example:** |
What is the purpose of this pull request?
Overview of changes:
Anything you'd like to highlight/discuss:
Testing instructions:
Rebuild web assets:
npm run build:web
Serve the test site:
npx markbind serve packages/cli/test/functional/test_site
In your browser, navigate to Footnotes examples near the bottom of the page.
Confirm that each footnote item now has a ↩ link.
Click the ↩ link and verify it scrolls you back to the original superscript reference.
Proposed commit message: (wrap lines at 72 characters)
feat(footnotes): add back-to-reference link for footnotes (#2699)
Re-enables the “↩” link on footnotes so readers can return to the
original reference. Updates User Guide and adds a manual test case
to verify back-link rendering and behavior.
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major,r.Minor,r.Patch.Breaking change release note preparation (if applicable):