Fix username/hashtag regexp

This commit is contained in:
Alexander Sheiko 2020-12-18 15:28:33 +02:00
parent 5d02321705
commit c9ba00cad7

View file

@ -11,7 +11,7 @@ import (
)
var (
reHashtag = regexp.MustCompile(`\B(\#\w+\b)`)
reHashtag = regexp.MustCompile(`\B(\#\S+\b)`)
reTwitterURL = regexp.MustCompile(`https:(\/\/t\.co\/([A-Za-z0-9]|[A-Za-z]){10})`)
reUsername = regexp.MustCompile(`\B(\@\S{1,15}\b)`)
)