bug fixes and wysiwyg behaviour improvements

This commit is contained in:
gsb
2026-04-30 22:47:26 +00:00
parent 5b2bd94388
commit 24560a4d21
7 changed files with 1014 additions and 25 deletions
+3 -3
View File
@@ -50,7 +50,7 @@ export interface DelimiterDef {
* and followed by non-whitespace. Right-flanking is the reverse.
*/
const PUNCTUATION = new Set(
' \t\n.,;:!?\'"()[]{}/<>\\-~#@&^|*`_'.split('')
' \t\n\u00A0.,;:!?\'"()[]{}/<>\\-~#@&^|*`_'.split('')
);
/**
@@ -416,9 +416,9 @@ export class InlineTokenizer {
const charAfter = source[position + delimiter.length];
const leftFlanking = (charBefore === undefined || PUNCTUATION.has(charBefore) || charBefore === '\n')
&& charAfter !== undefined && charAfter !== ' ' && charAfter !== '\n' && charAfter !== '\t';
&& charAfter !== undefined && charAfter !== ' ' && charAfter !== '\n' && charAfter !== '\t' && charAfter !== '\u00A0';
const rightFlanking = charBefore !== undefined && charBefore !== ' ' && charBefore !== '\n' && charBefore !== '\t'
const rightFlanking = charBefore !== undefined && charBefore !== ' ' && charBefore !== '\n' && charBefore !== '\t' && charBefore !== '\u00A0'
&& (charAfter === undefined || PUNCTUATION.has(charAfter) || charAfter === '\n');
if (leftFlanking) {