From e846ec516e26f5938004f8bfdf0b98944930103e Mon Sep 17 00:00:00 2001 From: aescling Date: Sun, 4 Sep 2022 21:04:13 -0400 Subject: [PATCH] Update ACCOUNT_STRING_RE to match MENTION_RE See https://gitlab.com/kibicat/mastodon/-/issues/13 --- app/models/concerns/account_finder_concern.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/concerns/account_finder_concern.rb b/app/models/concerns/account_finder_concern.rb index c4f255b73..0318060c9 100644 --- a/app/models/concerns/account_finder_concern.rb +++ b/app/models/concerns/account_finder_concern.rb @@ -50,7 +50,7 @@ module AccountFinderConcern # + not match if there is anything surrounding the mention, and # + add named subgroup matches # it would be ideal to explicitly refer to MENTION_RE, or a more fundamental regexp that we refactor MENTION_RE to incorporate - ACCOUNT_STRING_RE = /^@?(?#{Account::USERNAME_RE})(?:@(?[[:word:]\.\-]+[[:word:]]+))?$/i + ACCOUNT_STRING_RE = /^@?(?#{Account::USERNAME_RE})(?:@(?[[:alnum:]\.\-]+[[:alnum:]]+))?$/i class AccountFinder attr_reader :username, :domain -- 2.47.3