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:
@@ -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('"', '\\"')}"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user