diff options
author | ThibG <thib@sitedethib.com> | 2017-10-12 23:26:34 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-12 23:26:34 +0200 |
commit | d37305c628c37aa16c1356c12aecd8de2105b80f (patch) | |
tree | 5b9a80d4cc16ca3994c7a381c64616cffdf351d1 | |
parent | ad917cda106d779f0af776c1c856da43d1770524 (diff) |
Reduce discrepancies between server and client-side character count (#5360)
-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 588a372c6..e6d2487c5 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 = 'xxxxxxxxxxxxxxxxxxxxxxx'; export function countableText(inputText) { return inputText .replace(urlRegex, urlPlaceholder) - .replace(/(?:^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+)/ig, '@$2'); + .replace(/(?:^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+[a-z0-9]+)/ig, '@$2'); }; |