summaryrefslogtreecommitdiff
path: root/internal/text/link.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-07-29 13:18:22 +0200
committerLibravatar GitHub <noreply@github.com>2021-07-29 13:18:22 +0200
commita940a520d301d00f42012743b3999a73f7180848 (patch)
tree50bdd749381d6f773df46dbc4cc33a9b533a4e7b /internal/text/link.go
parentLink parsing (#120) (diff)
downloadgotosocial-a940a520d301d00f42012743b3999a73f7180848.tar.xz
Link hashtag bug (#121)
* link + hashtag bug * remove printlns * tidy up some duplicated code
Diffstat (limited to 'internal/text/link.go')
-rw-r--r--internal/text/link.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/text/link.go b/internal/text/link.go
index 440571a83..d42cc3b68 100644
--- a/internal/text/link.go
+++ b/internal/text/link.go
@@ -82,7 +82,7 @@ func contains(urls []*url.URL, url *url.URL) bool {
// Note: because Go doesn't allow negative lookbehinds in regex, it's possible that an already-formatted
// href will end up double-formatted, if the text you pass here contains one or more hrefs already.
// To avoid this, you should sanitize any HTML out of text before you pass it into this function.
-func ReplaceLinks(in string) string {
+func (f *formatter) ReplaceLinks(in string) string {
rxStrict, err := xurls.StrictMatchingScheme(schemes)
if err != nil {
panic(err)