bug fixes and wysiwyg behaviour improvements
This commit is contained in:
+3
-3
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user