Files
remanso/src/bus/noteEventBus.ts
Julien Calixte 4ce8c30649 fix(navigation): support anchor fragments in note links
Links like `path/to/note.md#heading` previously errored with "Note not
found" because the full href (including `#hash`) was matched against
file paths. Split the fragment off in the link handler, plumb it through
the event bus, and scroll the matching heading into view once the
target note is in place. Headings now get GitHub-style ids via
markdown-it-anchor + github-slugger so the anchors actually exist.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 09:40:30 +02:00

12 lines
221 B
TypeScript

import { createEventBus } from "retrobus"
interface EventBusParams {
user: string
repo: string
path: string
hash?: string
currentNoteSHA?: string
}
export const noteEventBus = createEventBus<EventBusParams>()