3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 14:45:44 +01:00

Answer architecture round 1: closeLeaf records the block definitions end beside the blocks it pushes, openedList's comment names the exception, the README drops its counts, the changelog puts other changes last, and item 98 files the blank-line re-scan

This commit is contained in:
2026-10-10 11:11:06 +02:00
parent caf64604fc
commit 6182ba6b63
4 changed files with 35 additions and 25 deletions
+8 -7
View File
@@ -239,8 +239,8 @@ Serves Goals 1, 4 and 5.
without a delimiter row, is an error result; each can be kept literal (`spec/flavour.md`).
- A document any reader built, written back with `adfToLosslessMarkdown`, takes the library's
canonical spelling, which round-trips byte-identically.
- Six CommonMark spellings parse without an error and build a document the reference
implementation renders differently. Four because ADF holds no node for what it renders:
- These CommonMark spellings parse without an error and build a document the reference
implementation renders differently, where ADF holds no node for what it renders:
- An empty link text reads as its destination, `[](/url)` as `/url` linked to `/url`, and `[]()`
as nothing. A link text holding only hard breaks reads the same, followed by its hard breaks.
- An image reads as an image only alone in its paragraph. Anywhere else — beside other text, in
@@ -253,11 +253,12 @@ Serves Goals 1, 4 and 5.
- An image's title becomes its caption when the image stays an image, and its link's title when
it becomes linked alt text. Inside another link, the title is dropped.
And two more: a shortcut reference matching its definition only under Unicode case folding
stays unresolved, and a link whose text holds an autolink keeps the inner link and leaves the
outer brackets literal text, which the spec requires and the reference itself breaks, nesting one
`<a>` in the other. `corpus/commonmark-spec/exceptions.json` pins the first four `node-model`
where the suite reaches them and the fifth `pending`; the suite holds no example of the last.
And these: a shortcut reference matching its definition only under Unicode case folding stays
unresolved, and a link whose text holds an autolink keeps the inner link and leaves the outer
brackets literal text, which the spec requires and the reference itself breaks, nesting one `<a>`
in the other. `corpus/commonmark-spec/exceptions.json` pins the spellings ADF holds no node for
`node-model` where the suite reaches them, and the case-folded reference `pending`; the suite
holds no example of a link holding an autolink.
- Not every document converts back: `adfToLosslessMarkdown` refuses a document nesting past 500
levels, and the node shapes the `unsupported-node-shape` row lists. Show the refusal and keep the
document read-only; saving markdown you could not produce is the loss the round-trip exists to