mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-19 22:55:44 +01:00
Kill the surviving mutants: spell each element's refusal directly, pin the cell refusals and the 0.3.1 background's anchors
This commit is contained in:
@@ -24,7 +24,8 @@ function markAttribute(mark: AdfMark): string | undefined {
|
||||
const attrs = nodeAttrs(mark)
|
||||
if (Object.keys(attrs).length !== 1) return undefined
|
||||
const { align, level } = attrs
|
||||
if (mark.type === 'alignment') return typeof align === 'string' && alignments.includes(align) ? ` ${alignAttribute}="${align}"` : undefined
|
||||
const alignment = alignments.find((name) => name === align)
|
||||
if (mark.type === 'alignment') return alignment === undefined ? undefined : ` ${alignAttribute}="${alignment}"`
|
||||
return mark.type === 'indentation' && typeof level === 'number' && indentLevels.includes(String(level)) ? ` ${indentAttribute}="${level}"` : undefined
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user