mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-12 11:48:29 +01:00
Give the card guard's real reason, the schema
This commit is contained in:
@@ -12,7 +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.
|
||||
// Refused, not carried: Atlassian's schema gives a card no link mark. 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])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user