Mention fixup (#167)

* rework mention creation a bit

* rework mention creation a bit

* tidy up status dereferencing

* start adding tests for dereferencing

* fixups

* fix

* review changes
This commit is contained in:
tobi 2021-08-29 12:03:08 +02:00 committed by GitHub
commit 53507ac2a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 680 additions and 192 deletions

View file

@ -30,7 +30,7 @@ const (
)
var (
mentionNameRegexString = `^@(\w+)(?:@([a-zA-Z0-9_\-\.]+)?)$`
mentionNameRegexString = `^@(\w+)(?:@([a-zA-Z0-9_\-\.:]+)?)$`
// mention name regex 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)
mentionNameRegex = regexp.MustCompile(mentionNameRegexString)