From b56d28bc9b028826435d582453f8c1c54edcc346 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Mon, 22 Apr 2024 17:20:59 +0300 Subject: [PATCH] Try literal notation --- packages/components/src/utils/strings.ts | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/packages/components/src/utils/strings.ts b/packages/components/src/utils/strings.ts index 8f002e78e4f2c8..c0f22800631d6a 100644 --- a/packages/components/src/utils/strings.ts +++ b/packages/components/src/utils/strings.ts @@ -5,23 +5,7 @@ import removeAccents from 'remove-accents'; import { paramCase } from 'change-case'; const ALL_UNICODE_DASH_CHARACTERS = new RegExp( - `[${ [ - // ~ (tilde) - '\u007e', - // ­ (soft hyphen) - '\u00ad', - // ⁓ (swung dash) - '\u2053', - // ⁻ (superscript minus) - '\u207b', - // ₋ (subscript minus) - '\u208b', - // − (minus sign) - '\u2212', - // any other Unicode dash character - '\\p{Pd}', - ].join( '' ) }]`, - 'gu' + /[\u007e\u00ad\u2053\u207b\u208b\u2212\p{Pd}]/gu ); export const normalizeTextString = ( value: string ): string => {