mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-21 07:32:58 +01:00
Answer prose round 1: 0 🔴, 8 🟡 (0 misread); correct the panel count, say which node rides the carry, list the new nodes' data-* attributes
This commit is contained in:
+10
-9
@@ -8,19 +8,20 @@
|
|||||||
to or from markdown, wrappers and forks aside; its second table lists other ecosystems'
|
to or from markdown, wrappers and forks aside; its second table lists other ecosystems'
|
||||||
libraries and Atlassian's own paths.
|
libraries and Atlassian's own paths.
|
||||||
- `adfToHtml` writes ADF as HTML: paragraphs, headings, lists, quotes, code blocks, rules, hard
|
- `adfToHtml` writes ADF as HTML: paragraphs, headings, lists, quotes, code blocks, rules, hard
|
||||||
breaks, a centered, uncaptioned external image holding no attribute but its URL and alt, an
|
breaks, a centered, uncaptioned external image holding no attribute but its URL and alt, and
|
||||||
emoji, a status, a date and a card holding only a URL (`<span class="adf-emoji">`, `<span class="adf-status">`,
|
`em`, `strong`, `code` and links as their elements. An unmarked emoji, status, date and card
|
||||||
`<time class="adf-date">`, `<a class="adf-inline-card">`), and `em`, `strong`, `code` and links as
|
holding a URL and no `data` are `<span class="adf-emoji">`, `<span class="adf-status">`,
|
||||||
their elements. A paragraph, heading, quote, list, list item, code block or
|
`<time class="adf-date">` and `<a class="adf-inline-card">`. A paragraph, heading, quote, list,
|
||||||
rule writes its other attributes as `data-*` attributes, `localId` as `data-local-id`. Every other
|
list item, code block, rule, emoji, status, date or card writes its other attributes as `data-*`
|
||||||
node is an element of class `adf-carry` holding the node's JSON in `data-adf` and showing its
|
attributes, `localId` as `data-local-id`. Every other node is an element of class `adf-carry` holding the node's JSON in `data-adf` and showing its
|
||||||
content, links included. Every URL is written as the ADF holds it,
|
content, links included. Every URL is written as the ADF holds it,
|
||||||
`javascript:` included: sanitize HTML from an author you do not trust before showing it.
|
`javascript:` included: sanitize HTML from an author you do not trust before showing it.
|
||||||
- `htmlToAdf` reads `adfToHtml`'s HTML back to the document it came from, a carry element from its
|
- `htmlToAdf` reads `adfToHtml`'s HTML back to the document it came from, a carry element from its
|
||||||
`data-adf`, and those elements. It reads that HTML as a browser's `innerHTML` writes it too (a raw `"` in text,
|
`data-adf`. It reads that HTML as a browser's `innerHTML` writes it too (a raw `"` in text,
|
||||||
` `, a raw `<` or `>` in an attribute value) and as a form post sends it (`\r\n` for each
|
` `, a raw `<` or `>` in an attribute value) and as a form post sends it (`\r\n` for each
|
||||||
line feed). It refuses any other HTML, including an edit to what a carry element shows, with the
|
line feed). An edit to an emoji's or status's text becomes its `text`; an edit to a date's or a
|
||||||
codes README §The calls lists.
|
card's text alone is refused. It refuses any other HTML, including an edit to what a carry element
|
||||||
|
shows, with the codes README §The calls lists.
|
||||||
- **Breaking:** `losslessMarkdownToAdf` gives a `date`, `emoji`, `inlineCard`, `mention`, `status`
|
- **Breaking:** `losslessMarkdownToAdf` gives a `date`, `emoji`, `inlineCard`, `mention`, `status`
|
||||||
or `mediaInline` only the marks Atlassian's schema lets it hold: `**!adf:mention[@A]{id=…}**` now
|
or `mediaInline` only the marks Atlassian's schema lets it hold: `**!adf:mention[@A]{id=…}**` now
|
||||||
reads as a plain mention. A link or directive mark around only nodes that cannot take it is
|
reads as a plain mention. A link or directive mark around only nodes that cannot take it is
|
||||||
|
|||||||
+11
-10
@@ -401,8 +401,8 @@ for HTML+, its Rovo MCP server's HTML for agents; a published spec reopens the g
|
|||||||
The HTML dialect mirrors the markdown flavour: semantic elements, stable `adf-*` classes, `data-*`
|
The HTML dialect mirrors the markdown flavour: semantic elements, stable `adf-*` classes, `data-*`
|
||||||
for what HTML cannot express, text always escaped. No stylesheet ships.
|
for what HTML cannot express, text always escaped. No stylesheet ships.
|
||||||
|
|
||||||
The spellings, `spec/html.md`, are four writer panels' (2026-10-23 and -24), each of a product
|
The spellings, `spec/html.md`, are five writer panels' (2026-10-23, -24 and 2026-11-04), each of a
|
||||||
manager, an engineer and a support agent. The first picked each of these 3 of 3:
|
product manager, an engineer and a support agent. The first picked each of these 3 of 3:
|
||||||
|
|
||||||
- an image standing alone as `<p><img …></p>`, over `<figure>` and a bare `<img>`;
|
- an image standing alone as `<p><img …></p>`, over `<figure>` and a bare `<img>`;
|
||||||
- a list item's first paragraph bare, `<li>Bolt</li>`, over `<li><p>Bolt</p></li>`;
|
- a list item's first paragraph bare, `<li>Bolt</li>`, over `<li><p>Bolt</p></li>`;
|
||||||
@@ -442,12 +442,12 @@ it joins the second panel's `<a>` to that portable spelling.
|
|||||||
Inside a carry element, a card a link marks links to the link's target, and shows its own URL as its
|
Inside a carry element, a card a link marks links to the link's target, and shows its own URL as its
|
||||||
text where it has one, so both stay. A card showing only its name keeps its URL in `data-adf` alone.
|
text where it has one, so both stay. A card showing only its name keeps its URL in `data-adf` alone.
|
||||||
Atlassian's schema gives no card a link mark, so only a hand-built document meets this;
|
Atlassian's schema gives no card a link mark, so only a hand-built document meets this;
|
||||||
`todo.md` item 133 ends it for a card holding `data` or a link mark, in 0.3.0. Recorded 2026-10-24
|
`todo.md` item 133 ends both, in 0.3.0, by writing such cards as their own element. Recorded 2026-10-24
|
||||||
without a panel of its own: it puts the second panel's `<a>` around the text a card shows.
|
without a panel of its own: it puts the second panel's `<a>` around the text a card shows.
|
||||||
|
|
||||||
A fifth panel (2026-11-04, three readers in the same roles, then four more for what the first three
|
A fifth panel (2026-11-04, three readers in the same roles, then four more for what the first three
|
||||||
split on) picked how an emoji, status, date and inline card are written, the nodes the carry held.
|
split on) was asked how to write a mention, emoji, status, date and inline card, which until then
|
||||||
The first three picked each of these 3 of 3:
|
rode the carry. The first three picked each of these 3 of 3:
|
||||||
|
|
||||||
- an emoji as `<span class="adf-emoji" data-id="1f389" data-short-name=":tada:">🎉</span>`, its text
|
- an emoji as `<span class="adf-emoji" data-id="1f389" data-short-name=":tada:">🎉</span>`, its text
|
||||||
the content, over an `<img>`;
|
the content, over an `<img>`;
|
||||||
@@ -457,11 +457,12 @@ The first three picked each of these 3 of 3:
|
|||||||
|
|
||||||
Seven readers picked a date as
|
Seven readers picked a date as
|
||||||
`<time class="adf-date" datetime="2025-08-25" data-timestamp="1756080000000">2025-08-25</time>`,
|
`<time class="adf-date" datetime="2025-08-25" data-timestamp="1756080000000">2025-08-25</time>`,
|
||||||
5 of 7: the day for people, the exact timestamp for scripts. Two splits stay open and ride the carry,
|
5 of 7: the day for people, the exact timestamp for scripts. Two questions stayed split, so a
|
||||||
`todo.md` item 133: a mention's `data-id`, `data-access-level` and `data-user-type` drew 4 of 7, over
|
mention and a card holding `data` ride the carry until the maintainer settles them, `todo.md` item
|
||||||
|
133: a mention's `data-id`, `data-access-level` and `data-user-type` drew 4 of 7, over
|
||||||
`data-mention-id` 2 and `data-user-id` 1; a card holding `data` and no URL drew `<a … href data-data>`
|
`data-mention-id` 2 and `data-user-id` 1; a card holding `data` and no URL drew `<a … href data-data>`
|
||||||
3, `<a … data-card>` 2 and `<span … data-data>` 2. The link-marked card's spelling hangs on that
|
3, `<a … data-card>` 2 and `<span … data-data>` 2. A card a link marks waits on the second answer,
|
||||||
one. So a card holding `data` or a mark rides the carry too.
|
since its name-only form is that card, so it rides the carry too.
|
||||||
|
|
||||||
## `htmlToAdf` also reads the dialect as a browser serializes it
|
## `htmlToAdf` also reads the dialect as a browser serializes it
|
||||||
|
|
||||||
@@ -898,7 +899,7 @@ adds scheme filtering.
|
|||||||
|
|
||||||
`adfToHtml` writes every URL exactly as the ADF holds it, escaped as every attribute value is,
|
`adfToHtml` writes every URL exactly as the ADF holds it, escaped as every attribute value is,
|
||||||
`javascript:`, `vbscript:`, `file:` and `data:` included. That covers a link's `href`, an image's
|
`javascript:`, `vbscript:`, `file:` and `data:` included. That covers a link's `href`, an image's
|
||||||
`src`, and the `href` of each link the carry element shows: a carried node's link mark, a card's
|
`src`, a card's `href`, and the `href` of each link the carry element shows: a carried node's link mark, a card's
|
||||||
`url` or `data.url`, and an external image's `url`. The markdown writers don't filter schemes
|
`url` or `data.url`, and an external image's `url`. The markdown writers don't filter schemes
|
||||||
either.
|
either.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user