Skip to content

DIALECT-01: Anchor a block, resolve it with byAnchor

A caret block-id (^id) terminating a block binds it for doc.byAnchor lookup.

Builds on: nothing — this is the first rung of Dialect: Anchors, Wikilinks, and Vault References.

Commands, code, and output together; comments mark which is which.

db.md
## Decision
| Choice | Owner |
| ------ | ----- |
| SQLite | Sam |
^db-choice
// consume
const doc = c.read(src, { path: "db.md" });
doc.byAnchor("db-choice")?.kind; // "table"
  • ^block-id dialect (anchors.ts)
  • Doc.byAnchor
  • BlockView.kind
  • contract.read