summaryrefslogtreecommitdiff
path: root/internal/text/plain.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-07-28 11:42:26 +0200
committerLibravatar GitHub <noreply@github.com>2021-07-28 11:42:26 +0200
commitea8ad8b346978b04b067eead8e1f2bbc3c1bfb45 (patch)
treece500bce803f944702677c29d83a9ae858246376 /internal/text/plain.go
parentbuild and bundle admin console + web assets (#119) (diff)
downloadgotosocial-ea8ad8b346978b04b067eead8e1f2bbc3c1bfb45.tar.xz
Link parsing (#120)
* add link parsing + formatting functionality * refinement + docs * add missing test * credit url library
Diffstat (limited to 'internal/text/plain.go')
-rw-r--r--internal/text/plain.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/text/plain.go b/internal/text/plain.go
index 24ef16f8e..4f6659484 100644
--- a/internal/text/plain.go
+++ b/internal/text/plain.go
@@ -28,6 +28,9 @@ import (
func (f *formatter) FromPlain(plain string, mentions []*gtsmodel.Mention, tags []*gtsmodel.Tag) string {
content := preformat(plain)
+ // format links nicely
+ content = ReplaceLinks(content)
+
// format mentions nicely
for _, menchie := range mentions {
targetAccount := &gtsmodel.Account{}