Give the CommonMark blocks a directive form for what their spelling cannot hold #26
@@ -75,6 +75,12 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "taskItem"
|
"type": "taskItem"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"attrs": {
|
||||||
|
"state": "TODO"
|
||||||
|
},
|
||||||
|
"type": "taskItem"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "taskList"
|
"type": "taskList"
|
||||||
|
|||||||
@@ -14,5 +14,6 @@ Then sign off.
|
|||||||
:::taskItem TODO {localId=01a033bd-a22d-7fb5-be9d-89d1aa261112}
|
:::taskItem TODO {localId=01a033bd-a22d-7fb5-be9d-89d1aa261112}
|
||||||
Nested step
|
Nested step
|
||||||
:::
|
:::
|
||||||
|
::taskItem TODO
|
||||||
::::
|
::::
|
||||||
:::::
|
:::::
|
||||||
|
|||||||
+2
-1
@@ -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
|
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.
|
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
|
**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
|
colons is followed immediately by a name character is claimed and must parse fully as a container
|
||||||
|
|||||||
@@ -132,7 +132,6 @@ function emitDirectiveBlock(node: AdfNode, directive: BlockDirective, path: Conv
|
|||||||
}
|
}
|
||||||
|
|
||||||
function emitInlineBody(content: readonly AdfNode[], path: ConvertErrorPath): Result<EmittedBody> {
|
function emitInlineBody(content: readonly AdfNode[], path: ConvertErrorPath): Result<EmittedBody> {
|
||||||
if (content.length === 0) return success({ fenceColons: 0, text: '' })
|
|
||||||
const line = emitInlineLine(content, 'paragraph', path)
|
const line = emitInlineLine(content, 'paragraph', path)
|
||||||
if (!line.ok) return line
|
if (!line.ok) return line
|
||||||
return success({ fenceColons: 0, text: line.value })
|
return success({ fenceColons: 0, text: line.value })
|
||||||
|
|||||||
Reference in New Issue
Block a user