From a0f81b12a6638327ae2f30ea333a92ae2b134c81 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 15 Nov 2026 12:53:59 +0100 Subject: [PATCH] Write no style attribute in adfToHtml, and name every spelling of
, and in their refusals --- CHANGELOG.md | 9 ++++-- README.md | 11 +++---- docs/decisions.md | 25 ++++++++++----- docs/reading-cost.md | 17 +++++++++++ spec/html.md | 16 +++++----- src/html/block-classes.ts | 1 + src/html/cell-element.ts | 32 ++++++++++--------- src/html/colour-style.ts | 16 ---------- src/html/emit/adf-to-html.test.ts | 34 ++++++++++----------- src/html/emit/adf-to-html.ts | 4 +-- src/html/mark-elements.ts | 30 +++++++++--------- src/html/parse/carry-element.ts | 17 ++++++++--- src/html/parse/html-to-adf.test.ts | 49 +++++++++++++++++------------- src/html/parse/html-to-adf.ts | 4 +-- src/html/parse/inline.ts | 3 +- src/html/parse/media-block.ts | 4 +-- src/html/text-block-attributes.ts | 20 ++++-------- todo.md | 12 -------- 18 files changed, 160 insertions(+), 144 deletions(-) delete mode 100644 src/html/colour-style.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 3897465..ba621b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,14 @@ `0.3.1` wrote the carry element, and `htmlToAdf` reads them back. A link around the image is the media's link mark. The carry element `0.3.1` wrote for them still reads. - `adfToHtml` writes underline as ``, subscript and superscript as `` and ``, a text colour as - ``, a background colour as `` and a paragraph's or - heading's alignment as `style="text-align:…"`, where `0.3.1` wrote the carry element, and `htmlToAdf` reads them + ``, a background colour as `` and a paragraph's or + heading's alignment as `data-align="center"` or `data-align="end"`, where `0.3.1` wrote the carry element, and `htmlToAdf` reads them back. The carry element `0.3.1` wrote for them still reads. +- `adfToHtml` writes a table cell's background as `data-background-color="…"`, where `0.3.1` wrote + `style="background-color:…"`, so the HTML holds no `style` attribute. `htmlToAdf` still reads the `0.3.1` spelling. + A background that isn't letters and digits after an optional `#` is written too, where it rode the carry element. +- `htmlToAdf` names every spelling of the dialect's `
`, `` and `` in the refusal of one it can't + read. - `adfToHtml` writes a paragraph's or heading's indentation as `data-indent-level="2"`, where `0.3.1` wrote the carry element, and `htmlToAdf` reads it back. The carry element `0.3.1` wrote for it still reads. - `htmlToAdf` reads an expand's `
`, as a browser writes one its user opened, as the same expand. diff --git a/README.md b/README.md index 9f97cdd..2fa491b 100644 --- a/README.md +++ b/README.md @@ -556,8 +556,7 @@ saving what this pair read replaces mentions, attachments and macros with text. ## HTML -Serves [Goals](#goals) 1, 6, 7 and 10, which `adfToHtml` does not yet meet: it still writes the `style` -attributes the table lists, and a later release replaces them. It writes the nodes and marks the table lists as their +Serves [Goals](#goals) 1, 6, 7 and 10. It writes the nodes and marks the table lists as their HTML elements, and keeps every other node whole: an element of class `adf-carry` holds the node's JSON in `data-adf` and shows the node's content, its links included, so a reader of the page loses no content. No stylesheet ships. The complete dialect: @@ -572,19 +571,19 @@ content. No stylesheet ships. The complete dialect: | `decisionList`, `decisionItem` | `