From 640772bc0f6cdebce23074967d6d0588b32f2b51 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 4 Oct 2026 23:01:16 +0200 Subject: [PATCH] Answer prose round 2: the edge-whitespace comment names the real spelling, the Raw HTML paragraph loses its half clause, items 75 and 77 read once --- spec/flavour.md | 5 ++--- src/markdown/emit/inline-line.ts | 2 +- todo.md | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/spec/flavour.md b/spec/flavour.md index 41de75c..e80909b 100644 --- a/spec/flavour.md +++ b/spec/flavour.md @@ -196,9 +196,8 @@ is the fence. CommonMark input may contain raw HTML. `markdownToAdf` routes each construct through the foreign HTML element mapping (`docs/decisions.md` §Foreign HTML sorts three ways; specified with the HTML -dialect) — ADF has no raw-HTML node, so a construct without a mapping, comments -and processing instructions included, is an error result naming it. The flavour never emits raw -HTML. +dialect) — ADF has no raw-HTML node, so a construct without a mapping, comments and processing +instructions included, is an error result naming it. The flavour never emits raw HTML. ## Block nodes diff --git a/src/markdown/emit/inline-line.ts b/src/markdown/emit/inline-line.ts index c54ccf3..f8ac5d3 100644 --- a/src/markdown/emit/inline-line.ts +++ b/src/markdown/emit/inline-line.ts @@ -130,7 +130,7 @@ function lineVerdict(segments: readonly InlineSegment[], container: LineContaine return run === undefined ? { kind: 'line', text: assembled.line } : { kind: 'unspellable-run', runs: [run, ...others] } } -// A space or tab CommonMark strips at a line edge rides !adf:text{} instead. +// A space or tab CommonMark strips at a line edge rides !adf:text{text="…"}. function spellEdgeWhitespace(segments: readonly InlineSegment[]): InlineSegment[] { const spelled: InlineSegment[] = [] for (const [index, segment] of segments.entries()) { diff --git a/todo.md b/todo.md index f258c01..06afce1 100644 --- a/todo.md +++ b/todo.md @@ -133,13 +133,13 @@ read as `spec/flavour.md` says. Breaking: `MIGRATION.md` says which call a calle ### 77. Decide whether Goal 1 promises a result for plain data only, or for any value, getters and Proxies included. -`docs/decisions.md` §No value `JSON.parse` or `structuredClone` builds loops a call leaves getters, -Proxies and non-enumerable keys to the caller, so `adfToMarkdown`, `adfToPlainMarkdown` and -`isAdfDocument` throw on a revoked Proxy or a throwing getter, and walk forever on a getter that -mints a fresh child per access. Goal 1 says every call returns a result. Either Goal 1 names plain -data, as the README's guarantees already do, or an item wraps the guard walk in a tight `try/catch` -returning `not-an-adf-document` with a bound on nodes visited, and the decision cites it. The -maintainer's call. Found by the technical-principles audit, 2026-10-04. +The `docs/decisions.md` entry "No value `JSON.parse` or `structuredClone` builds loops a call" +leaves getters, Proxies and non-enumerable keys to the caller, so `adfToMarkdown`, +`adfToPlainMarkdown` and `isAdfDocument` throw on a revoked Proxy or a throwing getter, and walk +forever on a getter that mints a fresh child per access. Goal 1 says every call returns a result. +Either Goal 1 names plain data, as the README's guarantees already do, or an item wraps the guard +walk in a tight `try/catch` returning `not-an-adf-document` with a bound on nodes visited, and that +entry cites the item. The maintainer's call. Found by the technical-principles audit, 2026-10-04. ### 68. Carry a non-text inline node holding `content` or `text`, a block holding `text`, and a leaf block holding `content`. @@ -152,10 +152,10 @@ audit, 2026-10-04. ### 75. Make the generated-markdown property write block carries as `adf:` fences, canonical and hostile. `blockCarry` and `hostileBlockCarry` (`src/conformance/markdown-property.test.ts`) write a fence -whose info string is `carry`, an ordinary code language since §The carry fence names the node type. -So the property reaches `readCarriedBlock`'s refusals only where a random edit lands in a canonical -document. Write `adf:` and `adf:` fences, canonical and hostile. Found by the -technical-principles audit, 2026-10-04. +whose info string is `carry`. Under the `docs/decisions.md` entry "The carry fence names the node +type", that is an ordinary code language, so the property reaches `readCarriedBlock`'s refusals only +where a random edit lands in a canonical document. Write `adf:` and `adf:` fences, canonical +and hostile. Found by the technical-principles audit, 2026-10-04. ### 65. Read an image not alone in its paragraph as its alt text linked to its URL, and a titled image alone in its paragraph as the image captioned with its title.