diff --git a/corpus/round-trip/block-nodes/task-list.json b/corpus/round-trip/block-nodes/task-list.json index b0a148f..b1758df 100644 --- a/corpus/round-trip/block-nodes/task-list.json +++ b/corpus/round-trip/block-nodes/task-list.json @@ -75,6 +75,12 @@ } ], "type": "taskItem" + }, + { + "attrs": { + "state": "TODO" + }, + "type": "taskItem" } ], "type": "taskList" diff --git a/corpus/round-trip/block-nodes/task-list.md b/corpus/round-trip/block-nodes/task-list.md index e4f3f22..030cce1 100644 --- a/corpus/round-trip/block-nodes/task-list.md +++ b/corpus/round-trip/block-nodes/task-list.md @@ -14,5 +14,6 @@ Then sign off. :::taskItem TODO {localId=01a033bd-a22d-7fb5-be9d-89d1aa261112} Nested step ::: +::taskItem TODO :::: ::::: diff --git a/spec/flavour.md b/spec/flavour.md index ea66cfc..7a788aa 100644 --- a/spec/flavour.md +++ b/spec/flavour.md @@ -86,7 +86,8 @@ fence or opaque carry is content. Canonical form uses minimal lengths. Directive fence lines follow code-fence indentation (up to three spaces relative to their container); trailing whitespace on a fence line is tolerated in input, never emitted. -**Leaf block**: `::name {attrs}` — a block-position node with no body. +**Leaf block**: `::name arg {attrs}` — a block-position node with no body, `arg` reading as +above. **Claiming at block level**, symmetric with inline: a line whose leading run of two or more colons is followed immediately by a name character is claimed and must parse fully as a container diff --git a/src/adf-to-markdown.ts b/src/adf-to-markdown.ts index 61a5f1d..60ce929 100644 --- a/src/adf-to-markdown.ts +++ b/src/adf-to-markdown.ts @@ -132,7 +132,6 @@ function emitDirectiveBlock(node: AdfNode, directive: BlockDirective, path: Conv } function emitInlineBody(content: readonly AdfNode[], path: ConvertErrorPath): Result { - if (content.length === 0) return success({ fenceColons: 0, text: '' }) const line = emitInlineLine(content, 'paragraph', path) if (!line.ok) return line return success({ fenceColons: 0, text: line.value })