Skip to content
Snippets Groups Projects
Commit d37305c6 authored by ThibG's avatar ThibG Committed by Eugen Rochko
Browse files

Reduce discrepancies between server and client-side character count (#5360)

parent ad917cda
No related branches found
No related tags found
No related merge requests found
......@@ -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');
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment