Emitter 2b: the block-node directives, the pipe table and the refusal corpus #11

Merged
lilleman merged 6 commits from block-nodes into main 2026-08-25 16:20:31 +02:00
3 changed files with 8 additions and 4 deletions
Showing only changes of commit 5be1bf677a - Show all commits
+2 -1
View File
@@ -76,7 +76,8 @@ The error surface is a contract too. `ConvertError` is `{ code, message, path }`
closed list a consumer may switch exhaustively, the message free text, the path the node's position closed list a consumer may switch exhaustively, the message free text, the path the node's position
from the document root. Adding, removing or renaming a code is breaking, so a milestone meeting a from the document root. Adding, removing or renaming a code is breaking, so a milestone meeting a
new failure cause reuses a code where one fits; the list is complete at `0.1.0`. A code names the new failure cause reuses a code where one fits; the list is complete at `0.1.0`. A code names the
cause, never the node — `path` and `message` carry that. cause; where one cause recurs across node types, one code covers them all and `path` and `message`
say which.
## 9. Release automation ## 9. Release automation
+1 -2
View File
@@ -72,8 +72,7 @@ for (const directory of emittingDirectories) {
} }
} }
// The rule spec/flavour.md states as "a container's fence is longer than every directive fence line // spec/flavour.md, Directives: the container fence rule, checked against the emitted bytes.
// in its body", checked against the emitted bytes: a hand-written fixture cannot be its own witness.
function fenceNestingFault(markdown: string): string | undefined { function fenceNestingFault(markdown: string): string | undefined {
const open: number[] = [] const open: number[] = []
let codeFence: string | undefined let codeFence: string | undefined
+5 -1
View File
@@ -82,6 +82,8 @@ detail is settled at its own milestone.
attribute canonicalization, a pipe cell's whitespace edges and `\u007c` for a `|` inside a attribute canonicalization, a pipe cell's whitespace edges and `\u007c` for a `|` inside a
quoted attribute value, documents combining nodes rather than isolating one, and a quoted attribute value, documents combining nodes rather than isolating one, and a
paragraph line inside a container body shaped like a closing fence (`:::`, `::: x`). paragraph line inside a container body shaped like a closing fence (`:::`, `::: x`).
Guard `fenceNestingFault`'s bare-run pop here too — a run shorter than the open fence is a
fault, not a close — which today's emitter cannot reach.
The gate gains the collision property here: no two corpus documents may emit the same The gate gains the collision property here: no two corpus documents may emit the same
bytes — one spelling for two documents is a round-trip break no parser can undo, and it is bytes — one spelling for two documents is a round-trip break no parser can undo, and it is
provable without one. It also settles the emitter's one known approximation: delimiter provable without one. It also settles the emitter's one known approximation: delimiter
@@ -114,7 +116,9 @@ detail is settled at its own milestone.
here too (§10), in `corpus/real-payloads/`: an ADF→markdown→ADF check with no expected here too (§10), in `corpus/real-payloads/`: an ADF→markdown→ADF check with no expected
markdown, the payloads supplied by the maintainer. markdown, the payloads supplied by the maintainer.
- [ ] **5 — Release pipeline, ship `0.1.0`.** Publish-on-version-change (§9), `NPM_TOKEN` secret, - [ ] **5 — Release pipeline, ship `0.1.0`.** Publish-on-version-change (§9), `NPM_TOKEN` secret,
the repo made public first (§6). `0.1.0` is the markdown round-trip: both markdown the repo made public first (§6). The `ConvertErrorCode` freeze (§8) is checkable here: every
`corpus/unspellable/` document is one of 1d's decisions, so the directory empties as they land
and whatever survives is permanent. `0.1.0` is the markdown round-trip: both markdown
directions, the types, `isAdfDocument`. The build lands here: a build tsconfig emitting JS directions, the types, `isAdfDocument`. The build lands here: a build tsconfig emitting JS
and `.d.ts` to `dist/` (the dev config's `allowImportingTsExtensions` forces `noEmit`, so and `.d.ts` to `dist/` (the dev config's `allowImportingTsExtensions` forces `noEmit`, so
the build config needs `rewriteRelativeImportExtensions`), plus `exports`/`files` in the build config needs `rewriteRelativeImportExtensions`), plus `exports`/`files` in