mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-02-11 23:30:16 +00:00
update mentionName regex
recognize instance accounts
This commit is contained in:
parent
c0ab7f5d69
commit
2f1b638357
|
@ -61,7 +61,7 @@
|
||||||
return rgx
|
return rgx
|
||||||
}()
|
}()
|
||||||
|
|
||||||
mentionName = `^@(\w+)(?:@([a-zA-Z0-9_\-\.:]+))?$`
|
mentionName = `^@([\w\-\.]+)(?:@([\w\-\.:]+))?$`
|
||||||
// MentionName captures the username and domain part from a mention string
|
// MentionName captures the username and domain part from a mention string
|
||||||
// such as @whatever_user@example.org, returning whatever_user and example.org (without the @ symbols)
|
// such as @whatever_user@example.org, returning whatever_user and example.org (without the @ symbols)
|
||||||
MentionName = regexp.MustCompile(mentionName)
|
MentionName = regexp.MustCompile(mentionName)
|
||||||
|
|
Loading…
Reference in a new issue