3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 06:35:44 +01:00

Answer stability round 1: 0 🔴, 3 🟡 (0 misread); refuse a seeded carry on a portable line, say what undefined means

This commit is contained in:
2026-10-31 02:50:23 +01:00
committed by Lillem4n
parent 97bd801c58
commit 6d09da68c7
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ export function inlineNodeModel(type: string): InlineNodeModel | undefined {
return Object.hasOwn(inlineNodes, type) ? inlineNodes[type] : undefined
}
// Undefined means every mark: the table lists only types the schema restricts. Text is code text, or formatted text, which withholds `border`.
// Undefined means every mark: a node type outside this module's tables, which the schema restricts nowhere.
export function takenMarkTypes(node: AdfNode): readonly string[] | undefined {
if (node.type === 'text') return nodeMarks(node).some((mark) => mark.type === 'code') ? codeTextMarkTypes : formattedTextMarkTypes
return inlineNodeModel(node.type)?.markTypes