Enable ESLint no-useless-escape (#23311)

This commit is contained in:
Nick Schonning
2023-02-13 09:12:14 -05:00
committed by GitHub
parent 4da5f77d92
commit db2c58d47a
12 changed files with 11 additions and 12 deletions

View File

@@ -5,5 +5,5 @@ const urlPlaceholder = '$2xxxxxxxxxxxxxxxxxxxxxxx';
export function countableText(inputText) {
return inputText
.replace(urlRegex, urlPlaceholder)
.replace(/(^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+[a-z0-9]+)/ig, '$1@$3');
.replace(/(^|[^/\w])@(([a-z0-9_]+)@[a-z0-9.-]+[a-z0-9]+)/ig, '$1@$3');
}