Answer the stability pass: the slot a line ending reached, and the text an image description dropped
CI / gate (push) Successful in 8s

This commit is contained in:
2026-09-01 22:35:05 +02:00
parent f4e4d77fc1
commit 1429f4ce3c
9 changed files with 43 additions and 12 deletions
+6
View File
@@ -77,6 +77,12 @@ export function readInlineDirective(text: string, index: number): Read<Directive
return readNestedDirective(text, index, 1)
}
// Both directions answer alike: an inline directive never spans lines, so no content slot holds a line ending.
export function slotLineEndingFault(type: string, text: string): ConvertFault | undefined {
if (!/[\n\r]/.test(text)) return undefined
return { code: 'unspellable-whitespace', message: `the ${type} content slot holds a newline no inline directive spans` }
}
export function spellAttributes(pairs: readonly (readonly [string, string])[]): string {
if (pairs.length === 0) return ''
const spelled = [...pairs].sort(([left], [right]) => keyOrder(left, right)).map(([key, value]) => `${key}=${value}`)