diff --git a/corpus/round-trip/block-nodes/image-boundary.json b/corpus/round-trip/block-nodes/image-boundary.json index 9267159..418c450 100644 --- a/corpus/round-trip/block-nodes/image-boundary.json +++ b/corpus/round-trip/block-nodes/image-boundary.json @@ -66,10 +66,18 @@ "content": [ { "attrs": { - "collection": "contentId-98237", - "id": "01a03389-e4eb-76a1-9eae-e8b7a01f4787", - "type": "file" + "alt": "The assembly drawing", + "type": "external", + "url": "https://example.com/assembly.png" }, + "marks": [ + { + "attrs": { + "href": "https://example.com/assembly" + }, + "type": "link" + } + ], "type": "media" } ], diff --git a/corpus/round-trip/block-nodes/image-boundary.md b/corpus/round-trip/block-nodes/image-boundary.md index 5d44004..e8f58f9 100644 --- a/corpus/round-trip/block-nodes/image-boundary.md +++ b/corpus/round-trip/block-nodes/image-boundary.md @@ -14,5 +14,5 @@ Taken from Kiruna. ::: :::mediaSingle {layout=center} -::media {collection=contentId-98237 id=01a03389-e4eb-76a1-9eae-e8b7a01f4787 type=file} +::media {alt="The assembly drawing" marks="[{\"attrs\":{\"href\":\"https://example.com/assembly\"},\"type\":\"link\"}]" type=external url="https://example.com/assembly.png"} ::: diff --git a/corpus/round-trip/block-nodes/table-directive.json b/corpus/round-trip/block-nodes/table-directive.json index 0280c0f..a218284 100644 --- a/corpus/round-trip/block-nodes/table-directive.json +++ b/corpus/round-trip/block-nodes/table-directive.json @@ -78,6 +78,25 @@ } ], "type": "tableRow" + }, + { + "content": [ + { + "content": [ + { + "content": [ + { + "text": "60", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableCell" + } + ], + "type": "tableRow" } ], "type": "table" diff --git a/corpus/round-trip/block-nodes/table-directive.md b/corpus/round-trip/block-nodes/table-directive.md index b070153..8415f26 100644 --- a/corpus/round-trip/block-nodes/table-directive.md +++ b/corpus/round-trip/block-nodes/table-directive.md @@ -12,4 +12,9 @@ Bolt M8 40 ::: :::: +::::tableRow +:::tableCell +60 +::: +:::: ::::: diff --git a/spec/flavour.md b/spec/flavour.md index b601f69..193fe35 100644 --- a/spec/flavour.md +++ b/spec/flavour.md @@ -18,8 +18,8 @@ normalizes to it through the round-trip. inline, so a `~~~` line opens a CommonMark tilde code fence. - Bullet lists `- `; ordered lists incrementing `1.` `2.` `3.`, the first number taken from the node's `order` attribute. Continuation lines align with the first character after the marker - (two spaces for `- `, three for `1. `); blank lines inside an item are empty lines. Lists are - tight — blank lines between items normalize away; ADF does not record tightness. + (two spaces for `- `, three for `1. `); blank lines inside an item are empty lines, none before + a nested list. Blank lines between items normalize away; ADF does not record tightness. - Blockquotes prefix lines with `> `; a blank line inside a blockquote is a bare `>`. - ATX headings (`#` … `######`); setext input normalizes to ATX. - Code fences ``` with the node's language as info string, the fence lengthened past any backtick @@ -42,9 +42,9 @@ normalizes to it through the round-trip. the leading delimiter of a construct that would otherwise open, re-scan from there, and repeat — with the opener literal the closer parses as text, so `*not emphasis*` is `\*not emphasis*`, one backslash. -- Blocks separated by one blank line — at document level, and between CommonMark blocks; two - directive blocks inside a container take none. No trailing whitespace outside a code block's - content, single trailing newline; a document with no blocks is the empty string. +- Blocks separated by one blank line at document level and between CommonMark blocks outside a + list; two directive blocks inside a container take none. No trailing whitespace outside a code + block's content, single trailing newline; a document with no blocks is the empty string. ## Directives @@ -199,10 +199,10 @@ The moon, at night. **The CommonMark image.** A paragraph whose entire inline content is one image `![alt](url)` is a `mediaSingle` with attrs exactly `{"layout":"center"}` holding an `external` `media` — `url` from the destination, `alt` the description's plain-text content when non-empty. `adfToMarkdown` -emits the image form for exactly that shape — those attrs and no others, no marks, no caption, -and a `media` carrying nothing beyond `alt`, `type` and `url`. An image amid other text, or one -carrying a title, is a named error: `mediaInline` carries a media `collection` + `id`, never a -URL, and no media node carries a title. +emits the image form for exactly that shape — those attrs and no others, no marks on either +node, no caption, and a `media` carrying nothing beyond `alt`, `type` and `url`. An image amid +other text, or one carrying a title, is a named error: `mediaInline` carries a media +`collection` + `id`, never a URL, and no media node carries a title. ### Tables diff --git a/todo.md b/todo.md index 1b8b345..1935906 100644 --- a/todo.md +++ b/todo.md @@ -39,10 +39,10 @@ detail is settled at its own milestone. `[t](u "He said "hi"")`, which holds no title. Two defensible spellings each — angle brackets or a backslash escape, and for titles `'…'` or `(…)` besides — so §8 leaves the pick here. **Also blocked**: block separation is unstated for a CommonMark block beside a - directive block in a container body — a `panel` (`panelType` `info`) whose content is - `paragraph` "A" then a `panel` (`panelType` `warning`) holding "B" spells `A` and - `:::panel warning` either on consecutive lines or with a blank line between. Two defensible - spellings, so §8 leaves the pick here. + directive block in a container body — an `expand` whose content is `paragraph` "A" then a + `panel` (`panelType` `warning`) holding "B" spells `A` and `:::panel warning` either on + consecutive lines or with a blank line between. Two defensible spellings, so §8 leaves the + pick here. - [x] **1d1 — The CommonMark subset**: blockquote, bulletList, codeBlock, heading, orderedList, paragraph, rule, listItem, hardBreak, text, code spans, and the `code`, `em`, `link`, `strike` and `strong` marks — one mark per text node; nesting is 1d5's.