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

Ship htmlToAdf: read back exactly the HTML adfToHtml writes, a carry element from its data-adf alone, any other HTML refused

This commit is contained in:
2026-10-26 21:47:30 +01:00
committed by Lillem4n
parent 905b039866
commit 51e37f68df
26 changed files with 880 additions and 74 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ export function vocabularyPairs(attrs: AdfAttributes, vocabulary: AttributeVocab
return pairs
}
function vocabularyPair(key: string, value: JsonValue, kind: AttributeKind): VocabularyPair | undefined {
export function vocabularyPair(key: string, value: JsonValue, kind: AttributeKind): VocabularyPair | undefined {
if (kind === 'boolean') return typeof value === 'boolean' ? { key, kind, value } : undefined
if (kind === 'number') return typeof value === 'number' ? { key, kind, value } : undefined
if (kind === 'numbers') return isNumberList(value) ? { key, kind, value } : undefined