3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-18 22:25:44 +01:00

Answer prose round 1: 0 🔴, 6 🟡 (0 misread); mark the cell background breaking, reword the panel entries and the alignment refusal

This commit is contained in:
2026-11-15 13:21:36 +01:00
committed by Lillem4n
parent ccdc3668f0
commit 4bf5d8a9d1
4 changed files with 17 additions and 14 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export function readTextBlockAttributes(pairs: readonly (readonly [string, strin
const mark = first === undefined ? undefined : readMark(first, element)
if (mark?.fault !== undefined) return mark
const rest = mark === undefined ? pairs : pairs.slice(1)
if (rest.some(([name]) => name === alignAttribute || name === indentAttribute)) return { fault: { code: 'unmappable-html', message: `<${element}> takes one of ${alignAttribute} and ${indentAttribute}, first, before its data-* attributes` } }
if (rest.some(([name]) => name === alignAttribute || name === indentAttribute)) return { fault: { code: 'unmappable-html', message: `<${element}> holds at most one of ${alignAttribute} and ${indentAttribute}, as its first attribute` } }
const data = readDataAttributes(rest, element, vocabulary, written)
if (data.fault !== undefined) return data
return { value: { attrs: data.value, marks: mark === undefined ? [] : [mark.value] } }