3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-14 04:30:24 +01:00

Spell every document the emitter refused for a carriage return, a null character, a code-span line start or an empty text node

This commit is contained in:
2026-10-04 20:29:29 +02:00
parent 0d805218fc
commit e040d1d3ef
19 changed files with 160 additions and 190 deletions
+1 -1
View File
@@ -117,5 +117,5 @@ export function escapeUnbalanced(spelling: string, opener: string, closer: strin
}
function spellTitle(title: string): string | undefined {
return /[\n\r\\]/.test(title) || holdsEntityReference(title) ? undefined : ` "${title.replaceAll('"', '\\"')}"`
return /[\n\r\0\\]/.test(title) || holdsEntityReference(title) ? undefined : ` "${title.replaceAll('"', '\\"')}"`
}