We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent acae42a commit fa996f5Copy full SHA for fa996f5
1 file changed
packages/nhsuk-frontend/src/nhsuk/components/character-count/character-count.mjs
@@ -89,7 +89,7 @@ export class CharacterCount extends ConfigurableComponent {
89
if (countType === 'words' && !('maxwords' in this.config)) {
90
try {
91
this.separator = new RegExp(
92
- '[\\p{White_Space}\\p{Dash_Punctuation}\\p{Other_Punctuation}\\p{Emoji}\\p{Join_Control}]+',
+ String.raw`[\p{White_Space}\p{Dash_Punctuation}\p{Other_Punctuation}\p{Emoji}\p{Join_Control}]+`,
93
'gu'
94
)
95
} catch {
0 commit comments