3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-12 11:48:29 +01:00

Name what the emitter carries above slotFault

This commit is contained in:
2026-10-14 00:23:16 +02:00
committed by Lillem4n
parent e0ead529bf
commit 60f50a4f2c
+1 -1
View File
@@ -105,7 +105,7 @@ export function readSoleStringAttribute(span: DirectiveSpan, key: string): Read<
return { value: spelled.decoded }
}
// The emitter carries such a node.
// The emitter carries a node whose slot this refuses.
export function slotFault(type: string, text: string): ConvertFault | undefined {
if (/[\n\r]/.test(text)) return unsupportedNodeShape(`the ${type} content slot holds a line ending, and an inline directive never spans lines: replace it with a space, or write the node as !adf:carry`)
return holdsNullCharacter(text) ? unsupportedNodeShape(`the ${type} content slot holds a null character: write the node as !adf:carry`) : undefined