From 1e20b0b6cc88fb560844d8ad58700c2bc62eab31 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 13 Sep 2026 11:10:41 +0200 Subject: [PATCH] Tick 3k and milestone 3, moving their text to todo-history.md --- todo-history.md | 36 +++++++++++++++++++++++++++++++++--- todo.md | 35 ++--------------------------------- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/todo-history.md b/todo-history.md index 5071f45..7615200 100644 --- a/todo-history.md +++ b/todo-history.md @@ -154,9 +154,19 @@ The done `todo.md` items in full, as they were written. `todo.md` keeps a one-li 2f raises what 1d's unspelled block separation costs: a single `localId` on a paragraph beside a plain one now refuses every container body that is a directive's — a panel, an expand, a table cell — where before 2f the attribute refused the document anyway. - -Under **3 — `markdownToAdf` (`0.1.0`)**: - +- [x] **3 — `markdownToAdf` (`0.1.0`).** Each sub-item lands the fixtures its own code reads, and + the runner grows a parse half as they do: readers for `corpus/normalization/` (setext, + indented code, loose lists, `*`/`+` + bullets, entity references, soft wraps — one-way, the markdown not canonical) and + `corpus/errors/` (a markdown input per named error, the code in a `.error` beside it) with + the first fixture each. `commonmark-subset/` cannot be the first to green — `::paragraph` + and `:hardBreak{}` sit in it — so 3b through 3f answer to their own tests and the one-way + fixtures they land, and 3g is where the first directory reads back. The raw-HTML element + mapping is empty until milestone 6, so at `0.1.0` every raw-HTML construct in input — a + block, an inline tag, a comment, a processing instruction — is a named error. Input is where + unbounded nesting actually arrives, so §11's 500 binds all three of the emitter's guards + here: block depth at 3c and again at 3f's container fences, inline and mark depth at 3f and + 3i, a carried value's JSON at 3j, where `isJsonValue` already bounds it. - [x] **3a — The hierarchy.** Mechanical, ahead of the first parser file: `src/adf/` and `src/markdown/` (`html/` arrives with its first file, 6-7), the grammar module shared inside `markdown/`, and `emphasis-matching.ts` beside it — the parser reuses it whole, @@ -386,6 +396,26 @@ Under **3 — `markdownToAdf` (`0.1.0`)**: `index.ts` gains `markdownToAdf` here, and the README's status line with it: this is the last parser chunk, so `parsingDirectories` becomes `emittingDirectories` and the whole corpus round-trips both ways — `0.1.0`'s proof, which 4 widens rather than replaces. + - [x] **3k — The CommonMark spec suite (`0.2.0`).** Checked in at `corpus/commonmark-spec/`, + pinned to the version it ships — the one `commonmark-grammar.ts` names for its start + conditions — `corpus/README.md` gaining the kind. + **Settled** (the maintainer, 2026-08-27): three checks an example must pass, the reference + HTML each ships read as corpus data — which adds no format and no direction (§1). §2's + canonical fixpoint: a named error, or markdown that parses and emits to itself byte for + byte. That HTML's text, tags stripped and entities decoded, against the parsed document's + concatenated `text`. And a count of the dozen elements the CommonMark subset covers + against the marks and nodes they map to — counting distinct mark types per text node, since + 3e collapses a spelling nested inside its own kind and `*(*a*)*` is two `` against one + `em`. The fixpoint alone is self-consistency a parser + returning the empty document passes, and the text alone one dropping every emphasis; the + counts close both. The exception list stays the maintainer's, and one entry is owed + already: 3h continues a list across the marker change CommonMark splits on, so an example + the reference HTML gives two `