mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-20 07:05:44 +01:00
Answer prose round 1: 0 🔴, 6 🟡; the changelog names what breaks, the fallback reads as untyped mark, attribute or value, the spec's value list and marks paragraph split, messages name the JSON array to write
This commit is contained in:
@@ -74,7 +74,7 @@ export function spellMarkAttributes(mark: AdfMark, spelling: MarkSpelling): stri
|
||||
return emptyKeys(mark).length > 0 && spelling.kind !== 'directive' ? undefined : spellMarkVocabulary(mark, spelling.attributes)
|
||||
}
|
||||
|
||||
// `undefined` where an attribute is one the vocabulary does not type.
|
||||
// `undefined` where the vocabulary lacks an attribute or types its value otherwise.
|
||||
export function spellMarkVocabulary(mark: AdfMark, vocabulary: AttributeVocabulary): string | undefined {
|
||||
const pairs = vocabularyPairs(nodeAttrs(mark), vocabulary, [])
|
||||
return pairs === undefined ? undefined : spellAttributes([...spellVocabulary(pairs), ...spellEmptyKeys(mark)])
|
||||
|
||||
Reference in New Issue
Block a user