mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 01:14:29 +08:00
fix: support for hyphens in group name
The group mention @ORG-team triggers notifications for the group @ORG. This fix changes the RegExp, so that the group name is correctly extracted. see: https://meta.discourse.org/t/group-mentions-that-begin-with-the-same-characters-may-be-incorrect/39892/12?u=rriemann
This commit is contained in:
@ -73,7 +73,7 @@ module PrettyText
|
||||
@ctx_init = Mutex.new
|
||||
|
||||
def self.mention_matcher
|
||||
Regexp.new("\\W@(\\w{#{SiteSetting.min_username_length},#{SiteSetting.max_username_length}})\\b")
|
||||
Regexp.new("\\W@([\\w\\-]{#{SiteSetting.min_username_length},#{SiteSetting.max_username_length}})\\b")
|
||||
end
|
||||
|
||||
def self.app_root
|
||||
|
Reference in New Issue
Block a user