From 029280b9d9c38564ee3821089c0a4afa2337a8b6 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 7 Oct 2022 00:41:57 -0400 Subject: [PATCH] Update hidden characters regex (#2738) --- src/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 818da7f64..e4b8b466e 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -334,8 +334,9 @@ export function normalize(str: string): string { // Arabic Letter RTL mark U+061C // Combining characters U+0300 - U+036F // Zero width no-break space (BOM) U+FEFF +// Blank/invisible characters (U2800, U2062-U2063) // eslint-disable-next-line no-misleading-character-class -const removeHiddenCharsRegex = /[\u2000-\u200F\u202A-\u202F\u0300-\u036F\uFEFF\u061C\s]/g; +const removeHiddenCharsRegex = /[\u2000-\u200F\u202A-\u202F\u0300-\u036F\uFEFF\u061C\u2800\u2062-\u2063\s]/g; export function escapeRegExp(string: string): string { return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");