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

Answer prose round 1: 0 🔴, 8 🟡; say which reader skips what, reorder the migration's keep-the-mark advice, file the decision title as a question

This commit is contained in:
2026-10-14 20:57:30 +02:00
committed by Lillem4n
parent 5886f76f96
commit e56291eb90
8 changed files with 44 additions and 36 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ export function inlineNodeModel(type: string): InlineNodeModel | undefined {
return Object.hasOwn(inlineNodes, type) ? inlineNodes[type] : undefined
}
// Undefined where the schema withholds no mark: the table lists no such type, text among them, but code text takes only `codeTextMarkTypes`.
// Undefined means every mark: the table lists only types the schema restricts, and it restricts text only when marked code.
export function takenMarkTypes(node: AdfNode): readonly string[] | undefined {
if (node.type === 'text') return nodeMarks(node).some((mark) => mark.type === 'code') ? codeTextMarkTypes : undefined
return inlineNodeModel(node.type)?.markTypes