3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 06:35:44 +01:00

Answer prose round 2: the slot rule gives the decided reason, and the touched paragraphs rewrap

This commit is contained in:
2026-10-04 21:11:18 +02:00
parent ae2e2acd16
commit ac47f7e0d3
3 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ export function readSoleStringAttribute(span: DirectiveSpan, key: string): Read<
return { value: spelled.decoded }
}
// No content slot holds a line ending or a null character, which only the text directive spells; the emitter carries such a node.
// An inline directive never spans lines, and no content slot holds a null character; the emitter carries such a node.
export function slotFault(type: string, text: string): ConvertFault | undefined {
if (/[\n\r]/.test(text)) return { code: 'unspellable-whitespace', message: `the ${type} content slot holds a newline no inline directive spans` }
return holdsNullCharacter(text) ? unsupportedNodeShape(`the ${type} content slot holds a null character: write the node as !adf:carry`) : undefined