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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user