diff options
author | Nick Schonning <nschonni@gmail.com> | 2023-02-13 09:12:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 15:12:14 +0100 |
commit | db2c58d47ae0db8490a30cd3846f30e615c382b5 (patch) | |
tree | a269d4db3ad97704d9c57ae88f03cca309b56fbe /app/javascript/mastodon/features/compose/util | |
parent | 4da5f77d929d6b83c134cae1eefbc8ba2db752f8 (diff) |
Enable ESLint no-useless-escape (#23311)
Diffstat (limited to 'app/javascript/mastodon/features/compose/util')
-rw-r--r-- | app/javascript/mastodon/features/compose/util/counter.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/compose/util/counter.js b/app/javascript/mastodon/features/compose/util/counter.js index 5a68bad99..ec2431096 100644 --- a/app/javascript/mastodon/features/compose/util/counter.js +++ b/app/javascript/mastodon/features/compose/util/counter.js @@ -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'); } |