From 4aa0dca9d3d7e8bead69e2251b05731f1ac456de Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 26 Aug 2026 23:04:41 +0200 Subject: [PATCH] Pin the link mark's two error codes, and correct what the unspellable corpus holds --- src/adf-to-markdown.test.ts | 2 ++ todo.md | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/adf-to-markdown.test.ts b/src/adf-to-markdown.test.ts index d2fc140..d8647ac 100644 --- a/src/adf-to-markdown.test.ts +++ b/src/adf-to-markdown.test.ts @@ -90,6 +90,8 @@ test('refuses a link attribute no markdown spelling holds', () => { code(adfToMarkdown(document(paragraph({ marks: [{ attrs: { href: 'https://example.com/', id: 'x' }, type: 'link' }], text: 't', type: 'text' })))), 'unspellable-mark', ) + assert.equal(code(adfToMarkdown(document(paragraph({ marks: [{ attrs: { href: 4 }, type: 'link' }], text: 't', type: 'text' })))), 'unspellable-mark') + assert.equal(code(adfToMarkdown(document(paragraph({ marks: [{ type: 'link' }], text: 't', type: 'text' })))), 'unsupported-node-shape') }) test('refuses a mark the canonical spellings cannot nest', () => { diff --git a/todo.md b/todo.md index 61f7d1b..5bc0b63 100644 --- a/todo.md +++ b/todo.md @@ -110,7 +110,10 @@ detail is settled at its own milestone. arg slot holding no bare token, marks no nesting spells — where the emitter still refuses, which leaves the refusals a container's own spelling owns. The carry spells `escaping: 'none'`, which is what makes `tryPipeCell` refuse the pipe form for a carry - whose JSON holds a pipe. + whose JSON holds a pipe. The flanking trigger 2e2 added to that list is the odd one out: + `unspellableMark` finds it after assembly and names a mark type against the line's path, + so the failing run needs identifying before the carry can replace the refusal + `corpus/unspellable/mark-inside-word` pins. - [ ] **2e5 — Combined documents and the collision property.** Documents combining nodes rather than isolating one, and the gate's collision property: no two corpus documents may emit the same bytes — one spelling for two documents is a round-trip break no parser can undo, @@ -169,8 +172,8 @@ detail is settled at its own milestone. markdown, the payloads supplied by the maintainer. - [ ] **5 — Release pipeline, ship `0.1.0`.** Publish-on-version-change (§9), `NPM_TOKEN` secret, 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 + `corpus/unspellable/` document is a decision or a deferred trigger this file names, 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 and `.d.ts` to `dist/` (the dev config's `allowImportingTsExtensions` forces `noEmit`, so the build config needs `rewriteRelativeImportExtensions`), plus `exports`/`files` in