Expand description
Wiki link parsing, slug generation, and link rewriting.
Handles [[Page Name]] and [[Page Name|alias]] syntax. Uses
pulldown-cmark to correctly identify code blocks and inline code spans,
so links inside code are reliably ignored.
Structs§
- Wiki
Link - A parsed
[[wikilink]]extracted from markdown content.
Functions§
- extract_
h1 - Extract the H1 title from markdown content, if present.
- extract_
links - Extract all
\[\[wikilinks\]\]from markdown content. - replace_
wikilinks - Replace all
\[\[wikilinks\]\]that resolve toold_slugwithnew_title. Preserves aliases:[[Old|alias]]->[[New Title|alias]]. Uses pulldown-cmark to skip links inside code blocks and inline code spans. - slugify
- Normalize a page name into a slug.
- title_
from_ slug - Convert a slug back to a title (best-effort reverse of slugify).