summaryrefslogtreecommitdiff
path: root/internal/regexes/regexes.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2021-10-17 13:19:49 +0100
committerLibravatar GitHub <noreply@github.com>2021-10-17 14:19:49 +0200
commit7e4c3fa5c7374363a28e9b0d028b6d71700607c7 (patch)
treea723ea4c9534d4bd88b09d0f287b4e8b79804a0e /internal/regexes/regexes.go
parentFollow request improvements (#282) (diff)
downloadgotosocial-7e4c3fa5c7374363a28e9b0d028b6d71700607c7.tar.xz
fix mention extracting when no domain exists (usually intra-instance mentions) (#272)
* fix mention extracting when no domain exists (usually when intra-instance mentions) Signed-off-by: kim <grufwub@gmail.com> * fix search logic to match new mention matching logic Signed-off-by: kim <grufwub@gmail.com> * appease the linter :p Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/regexes/regexes.go')
-rw-r--r--internal/regexes/regexes.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/regexes/regexes.go b/internal/regexes/regexes.go
index 93d672d3c..3dabb92af 100644
--- a/internal/regexes/regexes.go
+++ b/internal/regexes/regexes.go
@@ -47,7 +47,7 @@ const (
)
var (
- mentionName = `^@(\w+)(?:@([a-zA-Z0-9_\-\.:]+)?)$`
+ mentionName = `^@(\w+)(?:@([a-zA-Z0-9_\-\.:]+))?$`
// 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)
MentionName = regexp.MustCompile(mentionName)