Skip to content

Commit 1c73958

Browse files
committed
feat: add coderabit regex recommendation
1 parent 02cc614 commit 1c73958

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/web/src/utils/upload.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ function nonVisibleCharChecker(entry: string | undefined) {
6767
if (!entry) {
6868
return null;
6969
}
70-
const nonVisibleCharCheck = /[^\u0009\u000A\u000D\u0020-\u007E\u00C0-\u024F]+/g.exec(entry);
70+
const nonVisibleCharCheck = /[\u200B-\u200D\uFEFF\u180E\u00AD\u2060-\u2064\u206A-\u206F]/g.exec(entry);
71+
// /[^\u0009\u000A\u000D\u0020-\u007E\u00C0-\u024F]+/g
7172
// old regex /[\u200B-\u200D\uFEFF\u180E]/g
7273
return nonVisibleCharCheck;
7374
}

0 commit comments

Comments
 (0)