From 65f1c2aa859a09c4b98fa60c55c515fbc8a95fff Mon Sep 17 00:00:00 2001
From: Lilleman auf Larv
Date: Wed, 4 Nov 2026 16:44:10 +0100
Subject: [PATCH] =?UTF-8?q?Answer=20prose=20round=201:=200=20=F0=9F=94=B4,?=
=?UTF-8?q?=207=20=F0=9F=9F=A1=20(0=20misread);=20say=20a=20card=20shows?=
=?UTF-8?q?=20its=20name,=20else=20its=20URL,=20and=20tighten=20the=20item?=
=?UTF-8?q?=20133=20detail?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/decisions.md | 6 ++----
src/html/node-element.ts | 6 +++---
src/html/parse/html-to-adf.test.ts | 4 ++--
todo.md | 17 ++++++-----------
4 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/docs/decisions.md b/docs/decisions.md
index 21f5229..bb016e1 100644
--- a/docs/decisions.md
+++ b/docs/decisions.md
@@ -442,7 +442,7 @@ it joins the second panel's `` 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
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;
-`todo.md` item 133 ends it, in 0.3.0, by writing such cards as their own element. Recorded 2026-10-24
+`todo.md` item 133 settles, in 0.3.0, how such a card is written. Recorded 2026-10-24
without a panel of its own: it puts the second panel's `` 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
@@ -463,9 +463,7 @@ Seven readers picked a date as
and `` 2. The maintainer took the leading spelling of each, 2026-11-04:
- a mention is `@Mikael`, its `text` the content;
-- a card holding `data` and no URL is `Release plan`, `href` the URL its `data` holds and the text its name, else that URL. A card holding both `data` and a `url` rides the carry, since read back its `href` would not say which of the two it spells.
-
-A card a link marks waits on a spelling of its own, `todo.md` item 133, so it rides the carry.
+- a card holding `data` and no URL is `Release plan`, `href` the URL its `data` holds and the text its name, else that URL. A card holding both `data` and a `url` rides the carry: its `href`, read back, could not say which of the two URLs it spells.
## `htmlToAdf` also reads the dialect as a browser serializes it
diff --git a/src/html/node-element.ts b/src/html/node-element.ts
index 9bc1f25..89323b5 100644
--- a/src/html/node-element.ts
+++ b/src/html/node-element.ts
@@ -4,7 +4,7 @@ import { inlineNodeModel } from '../adf/inline-nodes.ts'
import { nodeAttrs } from '../adf/document.ts'
import { shownText, shownUrl } from '../adf/shown-text.ts'
-// `shown` is the text the element holds and `leading.value` the attribute right after the class, each `undefined` where the node cannot be written as this element and rides the carry. The reader builds the node from the element's `data-*` attributes and text, then holds both to what `shown` and `leading.value` answer for it, so only what the writer writes reads back. `written` names the attributes the text stands in for, which no `data-*` attribute repeats.
+// `shown` is the text the element holds and `leading.value` the attribute right after the class, each `undefined` where the node cannot be written as this element and rides the carry. The reader builds a node from the element's `data-*` attributes and text, and refuses it unless `shown` and `leading.value` give back that text and attribute, so only what the writer writes reads back. `written` names the attributes no `data-*` attribute may hold, since the text or `leading` spells them.
export type NodeElement = {
build(data: AdfAttributes, shown: string): AdfAttributes
class: string
@@ -33,7 +33,7 @@ const nodeElements: Readonly> = {
class: 'adf-inline-card',
element: 'a',
leading: { name: 'href', value: (node) => card(node)?.href },
- mismatch: 'holds one URL, as its href and as its text, or the name and URL its data-data holds, as its text and its href; to change the card, change them together',
+ mismatch: 'holds one URL, as its href and as its text, or the URL its data-data holds as its href and its name, else that URL, as its text; to change the card, change them together',
shown: (node) => card(node)?.text,
vocabulary: attributesOf('inlineCard'),
written: ['url'],
@@ -46,7 +46,7 @@ function attributesOf(type: string): AttributeVocabulary {
return inlineNodeModel(type)?.attributes ?? {}
}
-// A card holding `data` shows its name and links to the URL `data` holds; one holding both `data` and a `url` rides the carry, since read back its href would not say which of the two it spells.
+// A card holding both `data` and a `url` rides the carry: its href, read back, could not say which of the two URLs it spells.
function card(node: AdfNode): { href: string; text: string } | undefined {
const { data, url } = nodeAttrs(node)
if (data === undefined) return typeof url === 'string' && url !== '' ? { href: url, text: url } : undefined
diff --git a/src/html/parse/html-to-adf.test.ts b/src/html/parse/html-to-adf.test.ts
index 7dbd2b0..8516f12 100644
--- a/src/html/parse/html-to-adf.test.ts
+++ b/src/html/parse/html-to-adf.test.ts
@@ -430,8 +430,8 @@ const messages: readonly (readonly [string, string])[] = [
['\n
a
\n\n', ' takes start once, before its data-* attributes: found start after start'],
['
x
\n', 'data-wrap holds no boolean written as compact JSON'],
['
\n', ' holds its text, which is not empty: found "