Answer the stability pass: the slot a line ending reached, and the text an image description dropped
CI / gate (push) Successful in 8s
CI / gate (push) Successful in 8s
This commit is contained in:
@@ -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}`)
|
||||
|
||||
Reference in New Issue
Block a user