DIALECT-03: Extract a bare wikilink
What it demonstrates
Section titled “What it demonstrates”extractVaultRefs recognizes a bare [[page]] and returns its target.
Builds on: DIALECT-01: Anchor a block, resolve it with byAnchor
How it’s done
Section titled “How it’s done”A TypeScript program against the library API; inline comments show the resulting values and behavior.
import { extractVaultRefs } from "markdown-contract";
extractVaultRefs("See [[Project Atlas]] for context.");// → [{ kind: "wikilink", target: "Project Atlas",// raw: "[[Project Atlas]]" }]Surfaces exercised
Section titled “Surfaces exercised”extractVaultRefsVaultRef.kind/target/raw (wikilinks.ts)