Global #tag index. Independent of the file system: tags are
notebook-wide metadata, not phantom paths. See
src/notebook/reference.ts for shape.
Build markdown_yo render options from the current notebook config.
List every tag that has been mentioned anywhere in the notebook. Tags are case-folded, so the returned values are lowercase.
Read a note's markdown body, lazily. Always reads from disk and
runs the same front-matter normalisation as getNote — the body
is intentionally not cached on Note, so this is the canonical
way to fetch it.
Returns null for files that aren't markdown (extension not in
markdownFileExtensions), are missing, or exceed maxNoteFileSize.
Notes that mention a given #tag, anywhere in the notebook.
Tag is matched case-insensitively.
Reads from the in-memory notes map — same rationale as
getBacklinkedNotes: re-loading each referrer from disk would be
N async hops for no win, since the index can only contain
referrers we already loaded.
Same shape as getNoteBacklinks, but for a #tag rather than a
note filepath. Each Backlink groups a referrer note with the
individual #tag references inside it (token + rendered HTML).
Optional_fs: FileSystemApiOptionaloptions: ExtendedMarkdownItOptionsOptionalmarkdownOverride: stringProcess wiki link
content is string like "Test", "test.md | Test"
Incremental version of refreshNotes: instead of wiping the
indices and rebuilding from scratch, walk the workspace and only
re-process files whose on-disk mtime has advanced past the value
recorded in processedMtimes (set during the most recent full
refresh or prior incremental refresh). Newly-added files are
processed; cached entries that no longer exist on disk are
removed (their reference / tag entries cleaned up).
Designed to be cheap to call from a file-system watcher. The
directory walk still has to stat every file under dir, but the
O(N) markdown re-tokenisation is skipped for unchanged files.
Shares the refreshNotesMutex with refreshNotes so the two
can't race against each other.
Render markdown to HTML using markdown_yo (WASM) if available, otherwise falls back to markdown-it.
Optionaloptions: { isForPreview?: boolean }Get the absolute path of the note
Get the relative path of the note to the notebook directory
Resolve a wiki link file path to a notebook-root-relative path. Used by both index-time mention tracking and render-time embed resolution so both paths agree on link resolution.
— the file portion of the link (after processWikilink, without fragment/hash/block-id)
— the notebook-relative path of the note containing this link
notebook-root-relative file path
Staticinit
Optional markdown_yo WASM renderer. Used for HTML rendering when
markdownParser === 'markdown_yo'.