3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-18 22:25:44 +01:00

Say why the card guard refuses, and keep the spec's carry causes under their lead-in

This commit is contained in:
2026-11-04 19:55:21 +01:00
committed by Lillem4n
parent 5856b3c0d3
commit f23a1bc3c8
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -12,6 +12,7 @@ export function inlineHtml(nodes: readonly AdfNode[], path: ConvertErrorPath): R
let html = ''
let afterPlainText = false
for (const [index, node] of nodes.entries()) {
// Refused, not carried: HTML nests no link in a link. A card in a carried block never reaches here.
if (node.type === 'inlineCard' && nodeMarks(node).some(({ type }) => type === 'link')) {
return failure('unsupported-node-shape', 'an inlineCard takes no link mark: this one holds one', [...path, 'content', index])
}