From df4c2b35403e403fe4c17605fdbb7e712f6982ae Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 24 Aug 2026 13:10:27 +0200 Subject: [PATCH 1/5] Corpus 1d2: the block-node pairs, the fence lengths and the pipe-vs-directive boundary --- .../round-trip/block-nodes/block-marks.json | 39 ++++ corpus/round-trip/block-nodes/block-marks.md | 5 + .../round-trip/block-nodes/decision-list.json | 40 ++++ .../round-trip/block-nodes/decision-list.md | 8 + corpus/round-trip/block-nodes/expand.json | 50 +++++ corpus/round-trip/block-nodes/expand.md | 9 + corpus/round-trip/block-nodes/extension.json | 76 ++++++++ corpus/round-trip/block-nodes/extension.md | 14 ++ .../block-nodes/image-boundary.json | 65 +++++++ .../round-trip/block-nodes/image-boundary.md | 14 ++ corpus/round-trip/block-nodes/image.json | 31 +++ corpus/round-trip/block-nodes/image.md | 3 + corpus/round-trip/block-nodes/layout.json | 49 +++++ corpus/round-trip/block-nodes/layout.md | 8 + .../round-trip/block-nodes/media-group.json | 28 +++ corpus/round-trip/block-nodes/media-group.md | 4 + .../round-trip/block-nodes/media-single.json | 52 +++++ corpus/round-trip/block-nodes/media-single.md | 10 + .../round-trip/block-nodes/nested-fences.json | 55 ++++++ .../round-trip/block-nodes/nested-fences.md | 15 ++ corpus/round-trip/block-nodes/panel.json | 62 ++++++ corpus/round-trip/block-nodes/panel.md | 11 ++ corpus/round-trip/block-nodes/sync-block.json | 31 +++ corpus/round-trip/block-nodes/sync-block.md | 5 + .../block-nodes/table-directive.json | 85 +++++++++ .../round-trip/block-nodes/table-directive.md | 15 ++ .../block-nodes/table-pipe-boundary.json | 82 ++++++++ .../block-nodes/table-pipe-boundary.md | 18 ++ corpus/round-trip/block-nodes/table-pipe.json | 177 ++++++++++++++++++ corpus/round-trip/block-nodes/table-pipe.md | 6 + corpus/round-trip/block-nodes/task-list.json | 88 +++++++++ corpus/round-trip/block-nodes/task-list.md | 18 ++ 32 files changed, 1173 insertions(+) create mode 100644 corpus/round-trip/block-nodes/block-marks.json create mode 100644 corpus/round-trip/block-nodes/block-marks.md create mode 100644 corpus/round-trip/block-nodes/decision-list.json create mode 100644 corpus/round-trip/block-nodes/decision-list.md create mode 100644 corpus/round-trip/block-nodes/expand.json create mode 100644 corpus/round-trip/block-nodes/expand.md create mode 100644 corpus/round-trip/block-nodes/extension.json create mode 100644 corpus/round-trip/block-nodes/extension.md create mode 100644 corpus/round-trip/block-nodes/image-boundary.json create mode 100644 corpus/round-trip/block-nodes/image-boundary.md create mode 100644 corpus/round-trip/block-nodes/image.json create mode 100644 corpus/round-trip/block-nodes/image.md create mode 100644 corpus/round-trip/block-nodes/layout.json create mode 100644 corpus/round-trip/block-nodes/layout.md create mode 100644 corpus/round-trip/block-nodes/media-group.json create mode 100644 corpus/round-trip/block-nodes/media-group.md create mode 100644 corpus/round-trip/block-nodes/media-single.json create mode 100644 corpus/round-trip/block-nodes/media-single.md create mode 100644 corpus/round-trip/block-nodes/nested-fences.json create mode 100644 corpus/round-trip/block-nodes/nested-fences.md create mode 100644 corpus/round-trip/block-nodes/panel.json create mode 100644 corpus/round-trip/block-nodes/panel.md create mode 100644 corpus/round-trip/block-nodes/sync-block.json create mode 100644 corpus/round-trip/block-nodes/sync-block.md create mode 100644 corpus/round-trip/block-nodes/table-directive.json create mode 100644 corpus/round-trip/block-nodes/table-directive.md create mode 100644 corpus/round-trip/block-nodes/table-pipe-boundary.json create mode 100644 corpus/round-trip/block-nodes/table-pipe-boundary.md create mode 100644 corpus/round-trip/block-nodes/table-pipe.json create mode 100644 corpus/round-trip/block-nodes/table-pipe.md create mode 100644 corpus/round-trip/block-nodes/task-list.json create mode 100644 corpus/round-trip/block-nodes/task-list.md diff --git a/corpus/round-trip/block-nodes/block-marks.json b/corpus/round-trip/block-nodes/block-marks.json new file mode 100644 index 0000000..e30f90c --- /dev/null +++ b/corpus/round-trip/block-nodes/block-marks.json @@ -0,0 +1,39 @@ +{ + "content": [ + { + "attrs": { + "localId": "01a033d0-1393-790b-9d44-c572033ea4aa" + }, + "content": [ + { + "attrs": { + "width": 100 + }, + "content": [ + { + "content": [ + { + "text": "Full width.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "layoutColumn" + } + ], + "marks": [ + { + "attrs": { + "mode": "wide" + }, + "type": "breakout" + } + ], + "type": "layoutSection" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/block-marks.md b/corpus/round-trip/block-nodes/block-marks.md new file mode 100644 index 0000000..2264652 --- /dev/null +++ b/corpus/round-trip/block-nodes/block-marks.md @@ -0,0 +1,5 @@ +::::layoutSection {localId=01a033d0-1393-790b-9d44-c572033ea4aa marks="[{\"attrs\":{\"mode\":\"wide\"},\"type\":\"breakout\"}]"} +:::layoutColumn {width=100} +Full width. +::: +:::: diff --git a/corpus/round-trip/block-nodes/decision-list.json b/corpus/round-trip/block-nodes/decision-list.json new file mode 100644 index 0000000..41c94c7 --- /dev/null +++ b/corpus/round-trip/block-nodes/decision-list.json @@ -0,0 +1,40 @@ +{ + "content": [ + { + "attrs": { + "localId": "01a033c4-7aa0-723f-bd4b-018e0aa0103f" + }, + "content": [ + { + "attrs": { + "localId": "01a033c8-0df4-74df-a9f4-c2c4aa3cc2c1", + "state": "DECIDED" + }, + "content": [ + { + "text": "Ship on Friday.", + "type": "text" + } + ], + "type": "decisionItem" + }, + { + "attrs": { + "localId": "01a033cb-e13c-79b2-933f-b3cedd57e33e", + "state": "DECIDED" + }, + "content": [ + { + "text": "Keep the old endpoint for one release.", + "type": "text" + } + ], + "type": "decisionItem" + } + ], + "type": "decisionList" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/decision-list.md b/corpus/round-trip/block-nodes/decision-list.md new file mode 100644 index 0000000..6019439 --- /dev/null +++ b/corpus/round-trip/block-nodes/decision-list.md @@ -0,0 +1,8 @@ +::::decisionList {localId=01a033c4-7aa0-723f-bd4b-018e0aa0103f} +:::decisionItem {localId=01a033c8-0df4-74df-a9f4-c2c4aa3cc2c1 state=DECIDED} +Ship on Friday. +::: +:::decisionItem {localId=01a033cb-e13c-79b2-933f-b3cedd57e33e state=DECIDED} +Keep the old endpoint for one release. +::: +:::: diff --git a/corpus/round-trip/block-nodes/expand.json b/corpus/round-trip/block-nodes/expand.json new file mode 100644 index 0000000..765428e --- /dev/null +++ b/corpus/round-trip/block-nodes/expand.json @@ -0,0 +1,50 @@ +{ + "content": [ + { + "attrs": { + "title": "Full build log" + }, + "content": [ + { + "content": [ + { + "text": "The build ran for 11 minutes.", + "type": "text" + } + ], + "type": "paragraph" + }, + { + "content": [ + { + "text": "Warnings: 3.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "expand" + }, + { + "attrs": { + "localId": "01a03382-2ca7-745c-b85d-49b84d32cf99", + "title": "Torque values" + }, + "content": [ + { + "content": [ + { + "text": "Bolt M8: 25 Nm.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "nestedExpand" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/expand.md b/corpus/round-trip/block-nodes/expand.md new file mode 100644 index 0000000..05a2466 --- /dev/null +++ b/corpus/round-trip/block-nodes/expand.md @@ -0,0 +1,9 @@ +:::expand {title="Full build log"} +The build ran for 11 minutes. + +Warnings: 3. +::: + +:::nestedExpand {localId=01a03382-2ca7-745c-b85d-49b84d32cf99 title="Torque values"} +Bolt M8: 25 Nm. +::: diff --git a/corpus/round-trip/block-nodes/extension.json b/corpus/round-trip/block-nodes/extension.json new file mode 100644 index 0000000..6114751 --- /dev/null +++ b/corpus/round-trip/block-nodes/extension.json @@ -0,0 +1,76 @@ +{ + "content": [ + { + "attrs": { + "extensionKey": "toc", + "extensionType": "com.atlassian.confluence.macro.core", + "parameters": { + "maxLevel": 2, + "minLevel": 1 + }, + "text": "Table of contents" + }, + "type": "extension" + }, + { + "attrs": { + "extensionKey": "note", + "extensionType": "com.atlassian.confluence.macro.core", + "layout": "default", + "localId": "01a033d4-123e-70ec-9a9c-f55f189b3cf7" + }, + "content": [ + { + "content": [ + { + "text": "Handle with care.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "bodiedExtension" + }, + { + "attrs": { + "extensionKey": "tabs", + "extensionType": "com.atlassian.confluence.macro.core", + "localId": "01a033de-845f-70e2-abcf-cd5d23ba6101" + }, + "content": [ + { + "content": [ + { + "content": [ + { + "text": "Tab one.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "extensionFrame" + }, + { + "content": [ + { + "content": [ + { + "text": "Tab two.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "extensionFrame" + } + ], + "type": "multiBodiedExtension" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/extension.md b/corpus/round-trip/block-nodes/extension.md new file mode 100644 index 0000000..2df652c --- /dev/null +++ b/corpus/round-trip/block-nodes/extension.md @@ -0,0 +1,14 @@ +::extension {extensionKey=toc extensionType="com.atlassian.confluence.macro.core" parameters="{\"maxLevel\":2,\"minLevel\":1}" text="Table of contents"} + +:::bodiedExtension {extensionKey=note extensionType="com.atlassian.confluence.macro.core" layout=default localId=01a033d4-123e-70ec-9a9c-f55f189b3cf7} +Handle with care. +::: + +::::multiBodiedExtension {extensionKey=tabs extensionType="com.atlassian.confluence.macro.core" localId=01a033de-845f-70e2-abcf-cd5d23ba6101} +:::extensionFrame +Tab one. +::: +:::extensionFrame +Tab two. +::: +:::: diff --git a/corpus/round-trip/block-nodes/image-boundary.json b/corpus/round-trip/block-nodes/image-boundary.json new file mode 100644 index 0000000..15b2b86 --- /dev/null +++ b/corpus/round-trip/block-nodes/image-boundary.json @@ -0,0 +1,65 @@ +{ + "content": [ + { + "attrs": { + "layout": "center" + }, + "content": [ + { + "attrs": { + "alt": "The moon, at night.", + "type": "external", + "url": "https://example.com/moon.png" + }, + "type": "media" + }, + { + "content": [ + { + "text": "Taken from Kiruna.", + "type": "text" + } + ], + "type": "caption" + } + ], + "type": "mediaSingle" + }, + { + "attrs": { + "layout": "center", + "localId": "01a03394-6721-7075-bd6e-fd9a57b64b56" + }, + "content": [ + { + "attrs": { + "alt": "Torque chart", + "type": "external", + "url": "https://example.com/torque.png" + }, + "type": "media" + } + ], + "type": "mediaSingle" + }, + { + "attrs": { + "layout": "center" + }, + "content": [ + { + "attrs": { + "height": 480, + "type": "external", + "url": "https://example.com/plan.png", + "width": 640 + }, + "type": "media" + } + ], + "type": "mediaSingle" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/image-boundary.md b/corpus/round-trip/block-nodes/image-boundary.md new file mode 100644 index 0000000..3148474 --- /dev/null +++ b/corpus/round-trip/block-nodes/image-boundary.md @@ -0,0 +1,14 @@ +::::mediaSingle {layout=center} +::media {alt="The moon, at night." type=external url="https://example.com/moon.png"} +:::caption +Taken from Kiruna. +::: +:::: + +:::mediaSingle {layout=center localId=01a03394-6721-7075-bd6e-fd9a57b64b56} +::media {alt="Torque chart" type=external url="https://example.com/torque.png"} +::: + +:::mediaSingle {layout=center} +::media {height=480 type=external url="https://example.com/plan.png" width=640} +::: diff --git a/corpus/round-trip/block-nodes/image.json b/corpus/round-trip/block-nodes/image.json new file mode 100644 index 0000000..c919e68 --- /dev/null +++ b/corpus/round-trip/block-nodes/image.json @@ -0,0 +1,31 @@ +{ + "content": [ + { + "content": [ + { + "text": "Taken from the roof last night.", + "type": "text" + } + ], + "type": "paragraph" + }, + { + "attrs": { + "layout": "center" + }, + "content": [ + { + "attrs": { + "alt": "The moon, at night.", + "type": "external", + "url": "https://example.com/moon.png" + }, + "type": "media" + } + ], + "type": "mediaSingle" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/image.md b/corpus/round-trip/block-nodes/image.md new file mode 100644 index 0000000..9893c88 --- /dev/null +++ b/corpus/round-trip/block-nodes/image.md @@ -0,0 +1,3 @@ +Taken from the roof last night. + +![The moon, at night.](https://example.com/moon.png) diff --git a/corpus/round-trip/block-nodes/layout.json b/corpus/round-trip/block-nodes/layout.json new file mode 100644 index 0000000..7e50794 --- /dev/null +++ b/corpus/round-trip/block-nodes/layout.json @@ -0,0 +1,49 @@ +{ + "content": [ + { + "attrs": { + "localId": "01a033cc-4b60-7b5e-85f4-34f27f039e9a" + }, + "content": [ + { + "attrs": { + "width": 50 + }, + "content": [ + { + "content": [ + { + "text": "Left.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "layoutColumn" + }, + { + "attrs": { + "valign": "top", + "width": 50 + }, + "content": [ + { + "content": [ + { + "text": "Right.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "layoutColumn" + } + ], + "type": "layoutSection" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/layout.md b/corpus/round-trip/block-nodes/layout.md new file mode 100644 index 0000000..fa83e92 --- /dev/null +++ b/corpus/round-trip/block-nodes/layout.md @@ -0,0 +1,8 @@ +::::layoutSection {localId=01a033cc-4b60-7b5e-85f4-34f27f039e9a} +:::layoutColumn {width=50} +Left. +::: +:::layoutColumn {valign=top width=50} +Right. +::: +:::: diff --git a/corpus/round-trip/block-nodes/media-group.json b/corpus/round-trip/block-nodes/media-group.json new file mode 100644 index 0000000..6d1f8da --- /dev/null +++ b/corpus/round-trip/block-nodes/media-group.json @@ -0,0 +1,28 @@ +{ + "content": [ + { + "content": [ + { + "attrs": { + "collection": "contentId-98237", + "id": "01a03387-e300-7bcf-9a41-c27760696449", + "occurrenceKey": "01a0338a-2f44-764f-a7b7-1c1a2abbb49b", + "type": "file" + }, + "type": "media" + }, + { + "attrs": { + "collection": "contentId-98237", + "id": "01a03393-0b0b-71f6-89cd-dd654f42cf34", + "type": "link" + }, + "type": "media" + } + ], + "type": "mediaGroup" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/media-group.md b/corpus/round-trip/block-nodes/media-group.md new file mode 100644 index 0000000..6b90feb --- /dev/null +++ b/corpus/round-trip/block-nodes/media-group.md @@ -0,0 +1,4 @@ +:::mediaGroup +::media {collection=contentId-98237 id=01a03387-e300-7bcf-9a41-c27760696449 occurrenceKey=01a0338a-2f44-764f-a7b7-1c1a2abbb49b type=file} +::media {collection=contentId-98237 id=01a03393-0b0b-71f6-89cd-dd654f42cf34 type=link} +::: diff --git a/corpus/round-trip/block-nodes/media-single.json b/corpus/round-trip/block-nodes/media-single.json new file mode 100644 index 0000000..b9275ab --- /dev/null +++ b/corpus/round-trip/block-nodes/media-single.json @@ -0,0 +1,52 @@ +{ + "content": [ + { + "attrs": { + "layout": "center", + "width": 50 + }, + "content": [ + { + "attrs": { + "collection": "MediaServicesSample", + "id": "4478e39c-cf9b-41d1-ba92-68589487cd75", + "type": "file" + }, + "type": "media" + }, + { + "content": [ + { + "text": "The moon, at night.", + "type": "text" + } + ], + "type": "caption" + } + ], + "type": "mediaSingle" + }, + { + "attrs": { + "layout": "wrap-right", + "width": 33.33, + "widthType": "percentage" + }, + "content": [ + { + "attrs": { + "alt": "Torque chart", + "height": 480, + "type": "external", + "url": "https://example.com/torque.png", + "width": 640 + }, + "type": "media" + } + ], + "type": "mediaSingle" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/media-single.md b/corpus/round-trip/block-nodes/media-single.md new file mode 100644 index 0000000..999543b --- /dev/null +++ b/corpus/round-trip/block-nodes/media-single.md @@ -0,0 +1,10 @@ +::::mediaSingle {layout=center width=50} +::media {collection=MediaServicesSample id=4478e39c-cf9b-41d1-ba92-68589487cd75 type=file} +:::caption +The moon, at night. +::: +:::: + +:::mediaSingle {layout=wrap-right width="33.33" widthType=percentage} +::media {alt="Torque chart" height=480 type=external url="https://example.com/torque.png" width=640} +::: diff --git a/corpus/round-trip/block-nodes/nested-fences.json b/corpus/round-trip/block-nodes/nested-fences.json new file mode 100644 index 0000000..c4326a9 --- /dev/null +++ b/corpus/round-trip/block-nodes/nested-fences.json @@ -0,0 +1,55 @@ +{ + "content": [ + { + "content": [ + { + "content": [ + { + "content": [ + { + "attrs": { + "title": "Torque values" + }, + "content": [ + { + "content": [ + { + "text": "Bolt M8: 25 Nm.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "nestedExpand" + } + ], + "type": "tableCell" + }, + { + "content": [ + { + "attrs": { + "language": "text" + }, + "content": [ + { + "text": ":::::::panel warning\n:::", + "type": "text" + } + ], + "type": "codeBlock" + } + ], + "type": "tableCell" + } + ], + "type": "tableRow" + } + ], + "type": "table" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/nested-fences.md b/corpus/round-trip/block-nodes/nested-fences.md new file mode 100644 index 0000000..e63e6a2 --- /dev/null +++ b/corpus/round-trip/block-nodes/nested-fences.md @@ -0,0 +1,15 @@ +::::::table +:::::tableRow +::::tableCell +:::nestedExpand {title="Torque values"} +Bolt M8: 25 Nm. +::: +:::: +:::tableCell +```text +:::::::panel warning +::: +``` +::: +::::: +:::::: diff --git a/corpus/round-trip/block-nodes/panel.json b/corpus/round-trip/block-nodes/panel.json new file mode 100644 index 0000000..5e55386 --- /dev/null +++ b/corpus/round-trip/block-nodes/panel.json @@ -0,0 +1,62 @@ +{ + "content": [ + { + "attrs": { + "panelType": "warning" + }, + "content": [ + { + "content": [ + { + "text": "Check the collation before importing.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "panel" + }, + { + "attrs": { + "localId": "01a0337c-561a-75aa-b629-3801f68839ad", + "panelType": "info" + }, + "content": [ + { + "content": [ + { + "text": "Backups run at 02:00.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "panel" + }, + { + "attrs": { + "panelColor": "#c9372c", + "panelIcon": ":rainbow:", + "panelIconId": "1f308", + "panelIconText": "🌈", + "panelType": "custom" + }, + "content": [ + { + "content": [ + { + "text": "Weather permitting.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "panel" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/panel.md b/corpus/round-trip/block-nodes/panel.md new file mode 100644 index 0000000..35283fa --- /dev/null +++ b/corpus/round-trip/block-nodes/panel.md @@ -0,0 +1,11 @@ +:::panel warning +Check the collation before importing. +::: + +:::panel info {localId=01a0337c-561a-75aa-b629-3801f68839ad} +Backups run at 02:00. +::: + +:::panel custom {panelColor="#c9372c" panelIcon=":rainbow:" panelIconId=1f308 panelIconText="🌈"} +Weather permitting. +::: diff --git a/corpus/round-trip/block-nodes/sync-block.json b/corpus/round-trip/block-nodes/sync-block.json new file mode 100644 index 0000000..c2da799 --- /dev/null +++ b/corpus/round-trip/block-nodes/sync-block.json @@ -0,0 +1,31 @@ +{ + "content": [ + { + "attrs": { + "localId": "0198f3a2-af74-7e91-b26c-70b15f4d9ec3", + "resourceId": "ari:cloud:confluence:site/page/123" + }, + "type": "syncBlock" + }, + { + "attrs": { + "localId": "01a033df-0dee-7251-a710-98e76dc285e4", + "resourceId": "ari:cloud:confluence:site/page/456" + }, + "content": [ + { + "content": [ + { + "text": "Shared release notes.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "bodiedSyncBlock" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/sync-block.md b/corpus/round-trip/block-nodes/sync-block.md new file mode 100644 index 0000000..23e04b5 --- /dev/null +++ b/corpus/round-trip/block-nodes/sync-block.md @@ -0,0 +1,5 @@ +::syncBlock {localId=0198f3a2-af74-7e91-b26c-70b15f4d9ec3 resourceId="ari:cloud:confluence:site/page/123"} + +:::bodiedSyncBlock {localId=01a033df-0dee-7251-a710-98e76dc285e4 resourceId="ari:cloud:confluence:site/page/456"} +Shared release notes. +::: diff --git a/corpus/round-trip/block-nodes/table-directive.json b/corpus/round-trip/block-nodes/table-directive.json new file mode 100644 index 0000000..bcfa4d5 --- /dev/null +++ b/corpus/round-trip/block-nodes/table-directive.json @@ -0,0 +1,85 @@ +{ + "content": [ + { + "attrs": { + "isNumberColumnEnabled": true, + "layout": "default", + "localId": "01a0339e-c34f-7658-9d98-eb059401b7ab", + "width": 760 + }, + "content": [ + { + "content": [ + { + "attrs": { + "colspan": 2, + "colwidth": [ + 340, + 420 + ] + }, + "content": [ + { + "content": [ + { + "text": "Assembly", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableHeader" + } + ], + "type": "tableRow" + }, + { + "attrs": { + "localId": "01a033a9-d034-7466-b916-68643be958ff" + }, + "content": [ + { + "attrs": { + "background": "#deebff" + }, + "content": [ + { + "content": [ + { + "text": "Bolt M8", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableCell" + }, + { + "attrs": { + "valign": "top" + }, + "content": [ + { + "content": [ + { + "text": "40", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableCell" + } + ], + "type": "tableRow" + } + ], + "type": "table" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/table-directive.md b/corpus/round-trip/block-nodes/table-directive.md new file mode 100644 index 0000000..59408b2 --- /dev/null +++ b/corpus/round-trip/block-nodes/table-directive.md @@ -0,0 +1,15 @@ +:::::table {isNumberColumnEnabled=true layout=default localId=01a0339e-c34f-7658-9d98-eb059401b7ab width=760} +::::tableRow +:::tableHeader {colspan=2 colwidth="[340,420]"} +Assembly +::: +:::: +::::tableRow {localId=01a033a9-d034-7466-b916-68643be958ff} +:::tableCell {background="#deebff"} +Bolt M8 +::: +:::tableCell {valign=top} +40 +::: +:::: +::::: diff --git a/corpus/round-trip/block-nodes/table-pipe-boundary.json b/corpus/round-trip/block-nodes/table-pipe-boundary.json new file mode 100644 index 0000000..96f1c2d --- /dev/null +++ b/corpus/round-trip/block-nodes/table-pipe-boundary.json @@ -0,0 +1,82 @@ +{ + "content": [ + { + "content": [ + { + "content": [ + { + "content": [ + { + "content": [ + { + "text": "Pattern", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableHeader" + }, + { + "content": [ + { + "content": [ + { + "text": "Meaning", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableHeader" + } + ], + "type": "tableRow" + }, + { + "content": [ + { + "content": [ + { + "content": [ + { + "marks": [ + { + "type": "code" + } + ], + "text": "a|b", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableCell" + }, + { + "content": [ + { + "content": [ + { + "text": "Either a or b", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableCell" + } + ], + "type": "tableRow" + } + ], + "type": "table" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/table-pipe-boundary.md b/corpus/round-trip/block-nodes/table-pipe-boundary.md new file mode 100644 index 0000000..1cab3b5 --- /dev/null +++ b/corpus/round-trip/block-nodes/table-pipe-boundary.md @@ -0,0 +1,18 @@ +:::::table +::::tableRow +:::tableHeader +Pattern +::: +:::tableHeader +Meaning +::: +:::: +::::tableRow +:::tableCell +`a|b` +::: +:::tableCell +Either a or b +::: +:::: +::::: diff --git a/corpus/round-trip/block-nodes/table-pipe.json b/corpus/round-trip/block-nodes/table-pipe.json new file mode 100644 index 0000000..515cad6 --- /dev/null +++ b/corpus/round-trip/block-nodes/table-pipe.json @@ -0,0 +1,177 @@ +{ + "content": [ + { + "content": [ + { + "content": [ + { + "content": [ + { + "content": [ + { + "text": "Part", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableHeader" + }, + { + "content": [ + { + "content": [ + { + "text": "Note", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableHeader" + } + ], + "type": "tableRow" + }, + { + "content": [ + { + "content": [ + { + "content": [ + { + "text": "Bolt M8", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableCell" + }, + { + "content": [ + { + "content": [ + { + "text": "Grade 8.8", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableCell" + } + ], + "type": "tableRow" + }, + { + "content": [ + { + "content": [ + { + "content": [ + { + "text": "Nut | washer", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableCell" + }, + { + "content": [ + { + "content": [ + { + "text": "Sold as a pair", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableCell" + } + ], + "type": "tableRow" + }, + { + "content": [ + { + "content": [ + { + "content": [ + { + "text": "Washer M8", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableCell" + }, + { + "content": [ + { + "content": [ + { + "text": "100 pcs", + "type": "text" + }, + { + "type": "hardBreak" + }, + { + "text": "zinc-plated", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableCell" + } + ], + "type": "tableRow" + }, + { + "content": [ + { + "content": [ + { + "content": [ + { + "text": "Spare", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "tableCell" + }, + { + "content": [ + { + "type": "paragraph" + } + ], + "type": "tableCell" + } + ], + "type": "tableRow" + } + ], + "type": "table" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/table-pipe.md b/corpus/round-trip/block-nodes/table-pipe.md new file mode 100644 index 0000000..5d04f78 --- /dev/null +++ b/corpus/round-trip/block-nodes/table-pipe.md @@ -0,0 +1,6 @@ +| Part | Note | +| --- | --- | +| Bolt M8 | Grade 8.8 | +| Nut \| washer | Sold as a pair | +| Washer M8 | 100 pcs:hardBreak{}zinc-plated | +| Spare | | diff --git a/corpus/round-trip/block-nodes/task-list.json b/corpus/round-trip/block-nodes/task-list.json new file mode 100644 index 0000000..b0a148f --- /dev/null +++ b/corpus/round-trip/block-nodes/task-list.json @@ -0,0 +1,88 @@ +{ + "content": [ + { + "attrs": { + "localId": "0198f3a2-7c41-7f2e-9b3a-4d8e2c1a6b90" + }, + "content": [ + { + "attrs": { + "localId": "0198f3a2-8d52-70b1-8c4f-5e9f3d2b7ca1", + "state": "DONE" + }, + "content": [ + { + "text": "Write the spec", + "type": "text" + } + ], + "type": "taskItem" + }, + { + "attrs": { + "localId": "0198f3a2-9e63-7d80-a15b-6fa04e3c8db2", + "state": "TODO" + }, + "content": [ + { + "text": "Ship it", + "type": "text" + } + ], + "type": "taskItem" + }, + { + "attrs": { + "localId": "01a033b2-95c8-7d62-9b9c-dee7ad510982", + "state": "TODO" + }, + "content": [ + { + "content": [ + { + "text": "Check the torque.", + "type": "text" + } + ], + "type": "paragraph" + }, + { + "content": [ + { + "text": "Then sign off.", + "type": "text" + } + ], + "type": "paragraph" + } + ], + "type": "blockTaskItem" + }, + { + "attrs": { + "localId": "01a033b3-d1fa-7489-8c9f-f5846d2c249d" + }, + "content": [ + { + "attrs": { + "localId": "01a033bd-a22d-7fb5-be9d-89d1aa261112", + "state": "TODO" + }, + "content": [ + { + "text": "Nested step", + "type": "text" + } + ], + "type": "taskItem" + } + ], + "type": "taskList" + } + ], + "type": "taskList" + } + ], + "type": "doc", + "version": 1 +} diff --git a/corpus/round-trip/block-nodes/task-list.md b/corpus/round-trip/block-nodes/task-list.md new file mode 100644 index 0000000..e4f3f22 --- /dev/null +++ b/corpus/round-trip/block-nodes/task-list.md @@ -0,0 +1,18 @@ +:::::taskList {localId=0198f3a2-7c41-7f2e-9b3a-4d8e2c1a6b90} +:::taskItem DONE {localId=0198f3a2-8d52-70b1-8c4f-5e9f3d2b7ca1} +Write the spec +::: +:::taskItem TODO {localId=0198f3a2-9e63-7d80-a15b-6fa04e3c8db2} +Ship it +::: +:::blockTaskItem TODO {localId=01a033b2-95c8-7d62-9b9c-dee7ad510982} +Check the torque. + +Then sign off. +::: +::::taskList {localId=01a033b3-d1fa-7489-8c9f-f5846d2c249d} +:::taskItem TODO {localId=01a033bd-a22d-7fb5-be9d-89d1aa261112} +Nested step +::: +:::: +::::: -- 2.52.0 From 9f4b9774dd55b56685aad9fff3ae2f97b32a8eeb Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 24 Aug 2026 13:33:04 +0200 Subject: [PATCH 2/5] Pin block separation, the image guard's media, and the attribute and boundary cases the corpus missed --- .../round-trip/block-nodes/image-boundary.json | 16 ++++++++++++++++ corpus/round-trip/block-nodes/image-boundary.md | 4 ++++ corpus/round-trip/block-nodes/layout.json | 1 + corpus/round-trip/block-nodes/layout.md | 2 +- corpus/round-trip/block-nodes/media-single.json | 4 ++++ corpus/round-trip/block-nodes/media-single.md | 4 ++-- .../round-trip/block-nodes/table-directive.json | 5 ++++- corpus/round-trip/block-nodes/table-directive.md | 4 ++-- corpus/round-trip/block-nodes/table-pipe.json | 11 ++++++++++- corpus/round-trip/block-nodes/table-pipe.md | 2 +- spec/flavour.md | 12 +++++++----- todo.md | 11 ++++++++--- 12 files changed, 60 insertions(+), 16 deletions(-) diff --git a/corpus/round-trip/block-nodes/image-boundary.json b/corpus/round-trip/block-nodes/image-boundary.json index 15b2b86..9267159 100644 --- a/corpus/round-trip/block-nodes/image-boundary.json +++ b/corpus/round-trip/block-nodes/image-boundary.json @@ -58,6 +58,22 @@ } ], "type": "mediaSingle" + }, + { + "attrs": { + "layout": "center" + }, + "content": [ + { + "attrs": { + "collection": "contentId-98237", + "id": "01a03389-e4eb-76a1-9eae-e8b7a01f4787", + "type": "file" + }, + "type": "media" + } + ], + "type": "mediaSingle" } ], "type": "doc", diff --git a/corpus/round-trip/block-nodes/image-boundary.md b/corpus/round-trip/block-nodes/image-boundary.md index 3148474..5d44004 100644 --- a/corpus/round-trip/block-nodes/image-boundary.md +++ b/corpus/round-trip/block-nodes/image-boundary.md @@ -12,3 +12,7 @@ Taken from Kiruna. :::mediaSingle {layout=center} ::media {height=480 type=external url="https://example.com/plan.png" width=640} ::: + +:::mediaSingle {layout=center} +::media {collection=contentId-98237 id=01a03389-e4eb-76a1-9eae-e8b7a01f4787 type=file} +::: diff --git a/corpus/round-trip/block-nodes/layout.json b/corpus/round-trip/block-nodes/layout.json index 7e50794..8405400 100644 --- a/corpus/round-trip/block-nodes/layout.json +++ b/corpus/round-trip/block-nodes/layout.json @@ -7,6 +7,7 @@ "content": [ { "attrs": { + "localId": "01a03389-a5fb-747d-b418-e91f1b161e7f", "width": 50 }, "content": [ diff --git a/corpus/round-trip/block-nodes/layout.md b/corpus/round-trip/block-nodes/layout.md index fa83e92..12d73a5 100644 --- a/corpus/round-trip/block-nodes/layout.md +++ b/corpus/round-trip/block-nodes/layout.md @@ -1,5 +1,5 @@ ::::layoutSection {localId=01a033cc-4b60-7b5e-85f4-34f27f039e9a} -:::layoutColumn {width=50} +:::layoutColumn {localId=01a03389-a5fb-747d-b418-e91f1b161e7f width=50} Left. ::: :::layoutColumn {valign=top width=50} diff --git a/corpus/round-trip/block-nodes/media-single.json b/corpus/round-trip/block-nodes/media-single.json index b9275ab..87e61d3 100644 --- a/corpus/round-trip/block-nodes/media-single.json +++ b/corpus/round-trip/block-nodes/media-single.json @@ -15,6 +15,9 @@ "type": "media" }, { + "attrs": { + "localId": "01a03389-670b-7331-ae60-0446747ace7a" + }, "content": [ { "text": "The moon, at night.", @@ -37,6 +40,7 @@ "attrs": { "alt": "Torque chart", "height": 480, + "localId": "01a03389-8683-7c05-bfbb-457bcdb0ced3", "type": "external", "url": "https://example.com/torque.png", "width": 640 diff --git a/corpus/round-trip/block-nodes/media-single.md b/corpus/round-trip/block-nodes/media-single.md index 999543b..1a8c575 100644 --- a/corpus/round-trip/block-nodes/media-single.md +++ b/corpus/round-trip/block-nodes/media-single.md @@ -1,10 +1,10 @@ ::::mediaSingle {layout=center width=50} ::media {collection=MediaServicesSample id=4478e39c-cf9b-41d1-ba92-68589487cd75 type=file} -:::caption +:::caption {localId=01a03389-670b-7331-ae60-0446747ace7a} The moon, at night. ::: :::: :::mediaSingle {layout=wrap-right width="33.33" widthType=percentage} -::media {alt="Torque chart" height=480 type=external url="https://example.com/torque.png" width=640} +::media {alt="Torque chart" height=480 localId=01a03389-8683-7c05-bfbb-457bcdb0ced3 type=external url="https://example.com/torque.png" width=640} ::: diff --git a/corpus/round-trip/block-nodes/table-directive.json b/corpus/round-trip/block-nodes/table-directive.json index bcfa4d5..0280c0f 100644 --- a/corpus/round-trip/block-nodes/table-directive.json +++ b/corpus/round-trip/block-nodes/table-directive.json @@ -2,6 +2,7 @@ "content": [ { "attrs": { + "displayMode": "fixed", "isNumberColumnEnabled": true, "layout": "default", "localId": "01a0339e-c34f-7658-9d98-eb059401b7ab", @@ -41,7 +42,9 @@ "content": [ { "attrs": { - "background": "#deebff" + "background": "#deebff", + "localId": "01a03389-c573-72a6-a036-6cd9c6865301", + "rowspan": 2 }, "content": [ { diff --git a/corpus/round-trip/block-nodes/table-directive.md b/corpus/round-trip/block-nodes/table-directive.md index 59408b2..b070153 100644 --- a/corpus/round-trip/block-nodes/table-directive.md +++ b/corpus/round-trip/block-nodes/table-directive.md @@ -1,11 +1,11 @@ -:::::table {isNumberColumnEnabled=true layout=default localId=01a0339e-c34f-7658-9d98-eb059401b7ab width=760} +:::::table {displayMode=fixed isNumberColumnEnabled=true layout=default localId=01a0339e-c34f-7658-9d98-eb059401b7ab width=760} ::::tableRow :::tableHeader {colspan=2 colwidth="[340,420]"} Assembly ::: :::: ::::tableRow {localId=01a033a9-d034-7466-b916-68643be958ff} -:::tableCell {background="#deebff"} +:::tableCell {background="#deebff" localId=01a03389-c573-72a6-a036-6cd9c6865301 rowspan=2} Bolt M8 ::: :::tableCell {valign=top} diff --git a/corpus/round-trip/block-nodes/table-pipe.json b/corpus/round-trip/block-nodes/table-pipe.json index 515cad6..e0cb469 100644 --- a/corpus/round-trip/block-nodes/table-pipe.json +++ b/corpus/round-trip/block-nodes/table-pipe.json @@ -56,7 +56,16 @@ { "content": [ { - "text": "Grade 8.8", + "text": "Grade ", + "type": "text" + }, + { + "marks": [ + { + "type": "code" + } + ], + "text": "8.8", "type": "text" } ], diff --git a/corpus/round-trip/block-nodes/table-pipe.md b/corpus/round-trip/block-nodes/table-pipe.md index 5d04f78..f69b148 100644 --- a/corpus/round-trip/block-nodes/table-pipe.md +++ b/corpus/round-trip/block-nodes/table-pipe.md @@ -1,6 +1,6 @@ | Part | Note | | --- | --- | -| Bolt M8 | Grade 8.8 | +| Bolt M8 | Grade `8.8` | | Nut \| washer | Sold as a pair | | Washer M8 | 100 pcs:hardBreak{}zinc-plated | | Spare | | diff --git a/spec/flavour.md b/spec/flavour.md index 537931e..b601f69 100644 --- a/spec/flavour.md +++ b/spec/flavour.md @@ -42,8 +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, 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; 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 @@ -198,9 +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. -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, 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 0fe45a9..1b8b345 100644 --- a/todo.md +++ b/todo.md @@ -38,7 +38,11 @@ detail is settled at its own milestone. read back as href `…/a` plus literal `b)`; title `He said "hi"` emits `[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. + 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. - [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. @@ -51,8 +55,9 @@ detail is settled at its own milestone. - [ ] **1d4 β€” Opaque carry** (Β§3): an unknown node in both positions, the reserved `adf` info string, and the `codeBlock` whose language is `adf`. - [ ] **1d5 β€” Carve-outs and combinations**: the three carve-outs and their escapes, mark - nesting order and the runs a carry breaks, attribute canonicalization, and documents - combining nodes rather than isolating one. + nesting order and the runs a carry breaks, attribute canonicalization, documents + combining nodes rather than isolating one, and a paragraph line inside a container body + shaped like a closing fence (`:::`, `::: x`). - [ ] **1d6 β€” Input normalization**: one-way markdownβ†’ADF fixtures, not pairs β€” setext headings, indented code, loose lists, `*`/`+` bullets, entity references, soft wraps. - [ ] **1d7 β€” Error input**: also one-way, a markdown input per named error, asserting only -- 2.52.0 From 86248240ddfc11db1ed3152138736860a1e3ed86 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 24 Aug 2026 13:55:21 +0200 Subject: [PATCH 3/5] Scope block separation around lists, guard media marks, and keep the corpus editor-authorable --- .../block-nodes/image-boundary.json | 14 +++++++++++--- .../round-trip/block-nodes/image-boundary.md | 2 +- .../block-nodes/table-directive.json | 19 +++++++++++++++++++ .../round-trip/block-nodes/table-directive.md | 5 +++++ spec/flavour.md | 18 +++++++++--------- todo.md | 8 ++++---- 6 files changed, 49 insertions(+), 17 deletions(-) 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. -- 2.52.0 From 09cab702ead8cda728147cfe56f49d8e727e9ec9 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 24 Aug 2026 13:56:55 +0200 Subject: [PATCH 4/5] Let the list bullet carry its own separation exceptions --- spec/flavour.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/flavour.md b/spec/flavour.md index 193fe35..41e0f8a 100644 --- a/spec/flavour.md +++ b/spec/flavour.md @@ -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 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. +- 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. ## Directives -- 2.52.0 From 48c178a3339384cf23670ec48d76a1ce052d0814 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 24 Aug 2026 13:57:15 +0200 Subject: [PATCH 5/5] Rewrap the escaping bullet --- spec/flavour.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/flavour.md b/spec/flavour.md index 41e0f8a..14be46f 100644 --- a/spec/flavour.md +++ b/spec/flavour.md @@ -39,9 +39,9 @@ normalizes to it through the round-trip. - Paragraphs on one line β€” no soft wrapping; a soft line break in input becomes a single space. - Entity references in input decode to their characters; output backslash-escapes only where text would otherwise parse as syntax, scanning the assembled line rather than each text node: escape - 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. + 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. -- 2.52.0