Skip to content

Fixed markdown headings missing named anchors for anchor navigation - #51

Merged
oleg68 merged 2 commits into
nbplugins:mainfrom
oleg68:bugfix/markdown-local
Apr 16, 2026
Merged

oleg68 merged 2 commits into
nbplugins:mainfrom
oleg68:bugfix/markdown-local

Conversation

@oleg68

@oleg68 oleg68 commented Apr 16, 2026 •

Copy link
Copy Markdown
Collaborator

Oleg Samarin and others added 2 commits April 16, 2026 15:13
…view

Added historyAnchors list parallel to historyPaths/historyFos.
navigateToAnchor() pushes current file + anchor to all three lists and
increments historyIndex, so canGoBack() returns true after an anchor click.
restoreHistoryEntry() shared helper handles back/forward: same-file entries
scroll to anchor or top; different-file entries navigate then scroll.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added <a name="slug"> anchors to h1/h2/h3 headings in MarkdownRenderer so
that scrollToReference() in MarkdownPreviewTab can locate them when the user
clicks an anchor link. Added slugify() helper and tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oleg68 oleg68 changed the title Bugfix/markdown local Fixed markdown headings missing named anchors for anchor navigation Apr 16, 2026
@oleg68
oleg68 merged commit 0123c9c into nbplugins:main Apr 16, 2026
3 checks passed
@oleg68
oleg68 deleted the bugfix/markdown-local branch April 16, 2026 13:56
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