Skip to content

Commit

Permalink
Try literal notation
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Apr 22, 2024
1 parent 7fd5a36 commit b56d28b
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions packages/components/src/utils/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit b56d28b

Please sign in to comment.