mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-03 12:03:57 +00:00
Fix MENTION_RE to not match nil usernames (#6862)
This commit is contained in:
parent
f66a786029
commit
6f531d140b
|
@ -48,7 +48,7 @@
|
|||
|
||||
class Account < ApplicationRecord
|
||||
USERNAME_RE = /[a-z0-9_]+([a-z0-9_\.]+[a-z0-9_]+)?/i
|
||||
MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE}?)(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i
|
||||
MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE})(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i
|
||||
|
||||
include AccountAvatar
|
||||
include AccountFinderConcern
|
||||
|
|
Loading…
Reference in a new issue