logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: d37305c628c37aa16c1356c12aecd8de2105b80f
parent: ad917cda106d779f0af776c1c856da43d1770524
Author: ThibG <thib@sitedethib.com>
Date:   Thu, 12 Oct 2017 23:26:34 +0200

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


Diffstat:

Mapp/javascript/mastodon/features/compose/util/counter.js2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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'); };