Flavour spec 1b: block node syntaxes #4
+6
-7
@@ -4,9 +4,8 @@ The grammar of the extended markdown `adfToMarkdown` emits and `markdownToAdf` p
|
|||||||
CommonMark is a subset with two carve-outs: literal text that matches directive syntax below or
|
CommonMark is a subset with two carve-outs: literal text that matches directive syntax below or
|
||||||
opens a pipe table is claimed by the flavour (escape the `:` or `|` to keep it literal) — and
|
opens a pipe table is claimed by the flavour (escape the `:` or `|` to keep it literal) — and
|
||||||
one gap: a CommonMark image fits only as its own title-less paragraph — mid-text and titled
|
one gap: a CommonMark image fits only as its own title-less paragraph — mid-text and titled
|
||||||
images are named errors (ADF has a slot for neither). The emitted form is contract
|
images are named errors. The emitted form is contract (AGENTS.md §8). Per-node syntaxes build on
|
||||||
(AGENTS.md §8). Per-node syntaxes build on this grammar in the sections below (inline nodes and
|
this grammar in the sections below (inline nodes and marks: todo.md 1c).
|
||||||
marks: todo.md 1c).
|
|
||||||
|
|
||||||
## Canonical form
|
## Canonical form
|
||||||
|
|
||||||
@@ -142,8 +141,8 @@ markdown input the same mismatch is a named error.
|
|||||||
### Panel
|
### Panel
|
||||||
|
|
||||||
Container; the arg is `panelType` (`custom` `error` `info` `note` `success` `tip` `warning`).
|
Container; the arg is `panelType` (`custom` `error` `info` `note` `success` `tip` `warning`).
|
||||||
Attributes: `localId` (string), plus `custom` styling `panelColor` (string), `panelIcon`
|
Attributes: `localId` (string), `panelColor` (string), `panelIcon` (string), `panelIconId`
|
||||||
(string), `panelIconId` (string), `panelIconText` (string).
|
(string), `panelIconText` (string) — the editor writes the last four for `custom` panels.
|
||||||
|
|
||||||
```
|
```
|
||||||
:::panel warning
|
:::panel warning
|
||||||
@@ -185,7 +184,7 @@ The moon, at night.
|
|||||||
|
|
||||||
**The CommonMark image.** A paragraph whose entire inline content is one image `` is
|
**The CommonMark image.** A paragraph whose entire inline content is one image `` is
|
||||||
a `mediaSingle` with attrs exactly `{"layout":"center"}` holding an `external` `media` — `url`
|
a `mediaSingle` with attrs exactly `{"layout":"center"}` holding an `external` `media` — `url`
|
||||||
from the destination, `alt` from the image text when non-empty. `adfToMarkdown` emits the image
|
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
|
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 (ADF has a slot for neither).
|
other text, or one carrying a title, is a named error (ADF has a slot for neither).
|
||||||
|
|
||||||
@@ -290,7 +289,7 @@ attributes. The other three share: `extensionKey` (string), `extensionType` (str
|
|||||||
(`default` `full-width` `wide`), `localId` (string), `parameters` (json), `text` (string).
|
(`default` `full-width` `wide`), `localId` (string), `parameters` (json), `text` (string).
|
||||||
|
|
||||||
```
|
```
|
||||||
::extension {extensionKey=toc extensionType=com.atlassian.confluence.macro.core parameters="{\"maxLevel\":2}"}
|
::extension {extensionKey=toc extensionType="com.atlassian.confluence.macro.core" parameters="{\"maxLevel\":2}"}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Sync blocks
|
### Sync blocks
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ detail is settled at its own milestone.
|
|||||||
- [ ] **1c — Inline node syntaxes and marks** in `spec/flavour.md`: mention, emoji, status, date,
|
- [ ] **1c — Inline node syntaxes and marks** in `spec/flavour.md`: mention, emoji, status, date,
|
||||||
inlineCard, mediaInline; underline, subsup, textColor, border; the spelling for text nodes
|
inlineCard, mediaInline; underline, subsup, textColor, border; the spelling for text nodes
|
||||||
whose whitespace CommonMark cannot hold (literal newlines, leading or trailing spaces) —
|
whose whitespace CommonMark cannot hold (literal newlines, leading or trailing spaces) —
|
||||||
escape-based, never literal, since pipe cells trim and pad.
|
escape-based, never literal, since pipe cells trim and pad. At `mediaInline`, check real
|
||||||
|
payloads for external-URL support — if it exists, revisit the media section's
|
||||||
|
mid-text-image error and its "no slot" ground.
|
||||||
- [ ] **1d — Corpus start** (§10): checked-in ADF ↔ canonical-markdown fixture pairs per spec'd
|
- [ ] **1d — Corpus start** (§10): checked-in ADF ↔ canonical-markdown fixture pairs per spec'd
|
||||||
node.
|
node.
|
||||||
- [ ] **2 — `adfToMarkdown`.** First real code — decide here where §10's coverage check lives.
|
- [ ] **2 — `adfToMarkdown`.** First real code — decide here where §10's coverage check lives.
|
||||||
|
|||||||
Reference in New Issue
Block a user