From 53b2b1b2389c0ea941c50d4a9c726539d808c384 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 29 Jul 2017 00:06:29 +0200 Subject: Count all URLs in text as 23 characters flat, do not count domain part of usernames (#4427) * Count all URLs in text as 23 characters flat, do not count domain part of usernames * Add new status text counting logic to web UI --- app/models/account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models') diff --git a/app/models/account.rb b/app/models/account.rb index 82c9b58d5..163bd1c0e 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -44,7 +44,7 @@ # class Account < ApplicationRecord - MENTION_RE = /(?:^|[^\/[:word:]])@([a-z0-9_]+(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i + MENTION_RE = /(?:^|[^\/[:word:]])@(([a-z0-9_]+)(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i include AccountAvatar include AccountFinderConcern -- cgit