5b3: surface the refusal an inline directive body holds
CI / gate (push) Successful in 8s

This commit is contained in:
2026-09-03 19:33:25 +02:00
parent aa177d1f8e
commit 440dab5430
4 changed files with 11 additions and 2 deletions
+1
View File
@@ -134,6 +134,7 @@ function tableNode(rows: readonly string[][], definitions: LinkDefinitions, path
function inlineBodyNode(node: AdfNode, blocks: readonly Block[], definitions: LinkDefinitions, path: ConvertErrorPath): Result<AdfNode> {
if (blocks.length === 0) return failure('unsupported-node-shape', `an empty ${node.type} takes the leaf form, ::, never an empty container`, path)
const only = blocks.length === 1 ? blocks[0] : undefined
if (only?.kind === 'fault') return positioned(faulted(only.fault, path), only.position)
if (only?.kind !== 'paragraph') return failure('unsupported-node-shape', `${node.type} takes one paragraph as its body: this body is not one`, path)
return positioned(contentNode(node, only.text, definitions, path), only.position)
}