Skip to content

Commit 9e21bc3

Browse files
Apply Sonar suggestion
1 parent 26f86cd commit 9e21bc3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/nhsuk-frontend/src/nhsuk/components/character-count/character-count.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class CharacterCount extends ConfigurableComponent {
8989
if (!('maxwords' in this.config)) {
9090
try {
9191
this.separator = new RegExp(
92-
'[\\p{White_Space}\\p{Dash_Punctuation}\\p{Other_Punctuation}\\p{Emoji}\\p{Join_Control}]+',
92+
String.raw`[\p{White_Space}\p{Dash_Punctuation}\p{Other_Punctuation}\p{Emoji}\p{Join_Control}]+`,
9393
'gu'
9494
)
9595
} catch {

0 commit comments

Comments
 (0)