From f5a2897e0f26c37ac74160d6d957a204d5375f4e Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 15 Nov 2026 03:19:18 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20prose=20round=201:=201=20=F0=9F=94=B4,?= =?UTF-8?q?=2011=20=F0=9F=9F=A1=20(0=20misread);=20keep=20the=20spec's=20c?= =?UTF-8?q?arry=20rules=20true=20to=20the=20colour=20and=20figure=20spelli?= =?UTF-8?q?ngs,=20file=20the=20carry=20message=20and=20the=20block=20task?= =?UTF-8?q?=20item=20as=20items=20186=20and=20187,=20sort=20the=20new=20ro?= =?UTF-8?q?ws=20and=20imports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++--- spec/html.md | 21 ++++++++++----------- src/html/block-classes.ts | 2 +- src/html/media-element.ts | 2 +- src/html/parse/html-to-adf.test.ts | 13 +++++++++++++ src/html/parse/html-to-adf.ts | 6 +++--- src/html/parse/task-item.ts | 4 ++-- todo.md | 17 +++++++++++------ 8 files changed, 44 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index b97cdf4..a29c212 100644 --- a/README.md +++ b/README.md @@ -426,7 +426,6 @@ document normalizes to it through the round-trip. | `paragraph` | one line, no soft wraps | | `rule` | `---` | | `table` of one header row and plain inline cells | a pipe table, every row opening and closing with a pipe | -| `taskList`, `taskItem` | `\\n"'], ['
    \n
  • \n
\n', 'unmappable-html at /content/0/content/0: a task item holds text where a space follows its checkbox: found "\\n\\n"'], + ['
    \n
  • a

  • \n
\n', 'unmappable-html at /content/0/content/0:

as written here is no inline element of the dialect: found "

a

\\n\\n"'], ['
    \n
  • a
  • \n
\n', 'unmappable-html at /content/0/content/0: a task item starts with , checked where its data-state is DONE: found "a\\n\\n"'], ['
    \n
  • a
  • \n
\n', 'unmappable-html at /content/0/content/0: a task item starts with , checked where its data-state is DONE: found " "…'], ['
    \n
  • a
  • \n
\n', 'unmappable-html at /content/0/content/0: a task item starts with , checked where its data-state is DONE: found "', end)) { - const stop = nodes.length === 0 ? { at: end, message: `a task item holds text where a space follows its checkbox: ${foundAt(html, end)}` } : misread(html, end, 'an item holds inline content, then , as one line', 'no inline element of the dialect') + const stop = nodes.length === 0 && done !== undefined ? { at: end, message: `a task item holds text where a space follows its checkbox: ${foundAt(html, end)}` } : misread(html, end, 'an item holds inline content, then , as one line', 'no inline element of the dialect') return refused('unmappable-html', stop.message, html, stop.at, place) } return success({ end: end + ''.length, node: { ...node, content: nodes } }) diff --git a/todo.md b/todo.md index 2ce52e9..438eebf 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 187` +`Next ID = 188` ## Items @@ -15,7 +15,7 @@ | 184 | 0.4.0 | | question | **Write indentation as HTML in `adfToHtml` and read it back in `htmlToAdf`, in place of the carry element, once the maintainer settles whether its element carries a `margin-left` style.** | 1 | 2 | 2 | 3 | 2 | 6 by 2 | 3.2 | | 185 | 0.4.0 | | question | **Read `
` as the same expand, or keep refusing it, once the maintainer settles which.** | 1 | 1 | 2 | 2 | 2 | 6 by 1 | 1.6 | | 46 | 0.4.0 | | | **Publish the bundle size in the README, failing the release pipeline when it drifts.** | 2 | 2 | 1 | 3 | 4 | 3 by 3 | 2.6 | -| 186 | 0.4.0 | | | **Name the colour spelling `style="color:#rrggbb"` in the refusal of a `` or `` whose style differs from it.** | 1 | 1 | 1 | 1 | 1 | 6 by 1 | 1.9 | +| 186 | 0.4.0 | | | **Name every spelling of the dialect's `
`, `` and `` in the refusal of one that matches none.** | 1 | 1 | 1 | 1 | 1 | 6 by 1 | 1.9 | | 174 | 0.4.0 | | defect | **Bound the passes `trimmedEdges` takes by a constant, so a line of alternating code and emphasized blanks trims in linear time.** | 3 | 1 | 2 | 4 | 7 | 9 by 3 | 1.9 | | 51 | 0.4.0 | | | **Match a reference label to its definition under Unicode case folding.** | 2 | 1 | 2 | 3 | 4 | 4 by 2 | 1.7 | | 148 | 0.4.0 | | | **Ship conversion between ADF and Jira wiki markup both ways, under a README goal for wiki markup.** | 3 | 2 | 2 | 5 | 7 | 3 by 5 | 0.8 | @@ -34,6 +34,7 @@ | 82 | 0.5.0 | | | **Give the directive tests and fixtures random UUID v7 ids in place of `a-1`, `a`, `x` and `h`.** | 2 | 1 | 1 | 2 | 3 | code health by 1 | 5.3 | | 178 | 0.5.0 | | owner | **Reach the comprehension floor: move the reasoning behind the emitter's fallback and escape loops into the code that runs them, so each reads on its own.** | 3 | 1 | 2 | 4 | 7 | code health by 8 | 5.0 | | 58 | 0.5.0 | | | **Port `ci.sh`, `publish.sh`, `docker-runner.sh` and `mutation-tests/run.sh` to standalone Python scripts.** | 4 | 2 | 2 | 6 | 6 | code health by 3 | 3.5 | +| 187 | 0.5.0 | | | **Write a `blockTaskItem` and a nested task list as HTML in `adfToHtml` and read them back in `htmlToAdf`, in place of the carry element.** | 2 | 2 | 2 | 4 | 3 | 6 by 2 | 2.4 | | 9 | 0.5.0 | | | **Ship an online sandbox: a web page with two textboxes converting between ADF and markdown on the library's browser build.** | 3 | 2 | 1 | 4 | 6 | 3 by 6 | 1.7 | | 34 | 0.5.0 | | | **Read emphasis flanking by the whole character beside an astral symbol.** | 2 | 1 | 2 | 3 | 3 | 4 by 1 | 1.2 | | 74 | 0.5.0 | | owner | **Keep the release path publishing after npm retires bypass-2FA tokens.** | 3 | 2 | 4 | 7 | 4 | | 0.0 | @@ -50,9 +51,9 @@ ### 184. Write indentation as HTML in `adfToHtml` and read it back in `htmlToAdf`, in place of the carry element, once the maintainer settles whether its element carries a `margin-left` style. -Item 136 wrote alignment, underline, colours, subscript and superscript as HTML and left indentation on the carry element, since the writer panel did not settle one spelling. +Alignment, underline, colours, subscript and superscript are written as HTML, and indentation stays on the carry element, since the writer panel did not settle one spelling. -A writer panel of seven picked `data-indent-level` for the attribute name, 5 of 7. It split on whether a `margin-left` style stands beside it: 4 readers wanted the style as well, so a browser shows the indent, and 3 wanted the data attribute alone, as the alignment style is the only presentation the dialect writes. +A writer panel of seven picked `data-indent-level` for the attribute name, 5 of 7. It split on whether a `margin-left` style stands beside it: 4 readers wanted the style as well, so a browser shows the indent, and 3 wanted the data attribute alone, as the alignment and colour styles are the only presentation the dialect writes. Recommendation: the data attribute alone. The dialect writes no style the viewer needs to read the document, and a `margin-left` in some unit would be a second spelling of the level that has to agree with it. The level stays one value, `data-indent-level="2"`, and a block holding an indentation mark takes no other mark. @@ -76,9 +77,9 @@ or report the unminified gzip). The figure lands in README §The package beside dependencies" claim, and in a size column of the comparison table. Measured today, unminified: tarball 60.4 kB, unpacked 221.5 kB, JS gzipped 45.6 kB. -### 186. Name the colour spelling `style="color:#rrggbb"` in the refusal of a `` or `` whose style differs from it. +### 186. Name every spelling of the dialect's `
`, `` and `` in the refusal of one that matches none. -A reader who writes ``, `` or a bare `` gets the carry element's refusal or "no inline element of the dialect", neither of which names the spelling `adfToHtml` writes: `style="color:#rrggbb"`, no space, six lowercase hex digits, and ``. Add the spelling to the message of `readCarry` for a `span` and to the one `readTagged` gives a `mark`, each pinned in `pinnedRefusals`. +A `
` or `` of the dialect that is no carry element is refused with a message naming the carry element and the classes of `nodeElements`, which leaves out the panel, the media group, the file `` and the colour spans. A reader who writes ``, `` or a bare `` gets that message or "no inline element of the dialect", neither of which names the spelling `adfToHtml` writes: `style="color:#rrggbb"`, no space, and ``. Name each spelling in the message of `readCarry` and in the one `readTagged` gives a `mark`, each pinned in `pinnedRefusals`. ### 174. Bound the passes `trimmedEdges` takes by a constant, so a line of alternating code and emphasized blanks trims in linear time. @@ -249,6 +250,10 @@ Technical principle "Prefer a standalone Python script over a shell script": `AG bash footguns (`&&` chaining under `||`, `tee /dev/stderr`) the port removes. A wrong line range in `run.sh` mutates the wrong lines without failing, so the port tests how it reads diff hunks. +### 187. Write a `blockTaskItem` and a nested task list as HTML in `adfToHtml` and read them back in `htmlToAdf`, in place of the carry element. + +The reader panel of §The HTML dialect expected a `blockTaskItem` as an `
  • ` of two `

    ` and a nested task list as an inner `

      `. The writer panel's spellings left both on the carry, since a task item holds inline content alone. A writer panel settles the two spellings (AGENTS.md §7); the item takes it and writes the HTML both ways. + ### 34. Read emphasis flanking by the whole character beside an astral symbol. Check whether `delimiterRunToken` (`inline-tokens.ts`) and `resolveEmphasis` (`line-escaping.ts`)