Skip to content

Commit 0ce61a8

Browse files
committed
chore: add mongolian vowel separator unicode to regex catch
1 parent c5b9005 commit 0ce61a8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

apps/web/src/utils/upload.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ function parseSetEntry(entry: string): Set<string> {
6464
}
6565

6666
const ansiEscapeCode = '[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]',
67-
zeroWidthCharacterExceptNewline = '\u0000-\u0008\u000B-\u0019\u001b\u009b\u00ad\u200b\u2028\u2029\ufeff\ufe00-\ufe0f';
67+
zeroWidthCharacterExceptNewline =
68+
'\u0000-\u0008\u000B-\u0019\u001b\u180e\u009b\u00ad\u200b\u2028\u2029\ufeff\ufe00-\ufe0f';
6869

6970
const zeroWidthCharactersExceptNewline = new RegExp(
7071
'(?:' + ansiEscapeCode + ')|[' + zeroWidthCharacterExceptNewline + ']',
@@ -75,9 +76,9 @@ function nonVisibleCharChecker(entry: string | undefined) {
7576
if (!entry) {
7677
return null;
7778
}
79+
7880
zeroWidthCharactersExceptNewline.lastIndex = 0;
7981
const nonVisibleCharCheck = zeroWidthCharactersExceptNewline.exec(entry);
80-
8182
return nonVisibleCharCheck;
8283
}
8384

0 commit comments

Comments
 (0)