Skip to content

DIALECT-05: Read heading and anchor fragments

A #heading or #^anchor fragment is parsed out as VaultRef.fragment.

Builds on: DIALECT-03: Extract a bare wikilink

A TypeScript program against the library API; inline comments show the resulting values and behavior.

extractVaultRefs("[[Spec#Goals]] then [[Spec#^db-choice]]");
// → [{ target: "Spec", fragment: "Goals", kind: "wikilink" },
// { target: "Spec", fragment: "^db-choice", kind: "wikilink" }]
  • extractVaultRefs
  • VaultRef.fragment (heading and ^anchor forms)