drafting out test structs

This commit is contained in:
tsmethurst
2021-04-05 20:34:56 +02:00
parent ca69a4102b
commit 21ffcd98ec
6 changed files with 405 additions and 23 deletions

View File

@ -32,10 +32,10 @@ var (
mentionRegex = regexp.MustCompile(mentionRegexString)
// hashtag regex can be played with here: https://regex101.com/r/Vhy8pg/1
hashtagRegexString = `(?: |^|\W)?#([a-zA-Z0-9]{1,30})(?:\b|\r)`
hashtagRegex = regexp.MustCompile(hashtagRegexString)
hashtagRegex = regexp.MustCompile(hashtagRegexString)
// emoji regex can be played with here: https://regex101.com/r/478XGM/1
emojiRegexString = `(?: |^|\W)?:([a-zA-Z0-9_]{2,30}):(?:\b|\r)?`
emojiRegex = regexp.MustCompile(emojiRegexString)
emojiRegex = regexp.MustCompile(emojiRegexString)
)
// DeriveMentions takes a plaintext (ie., not html-formatted) status,