From ea8ad8b346978b04b067eead8e1f2bbc3c1bfb45 Mon Sep 17 00:00:00 2001 From: Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 28 Jul 2021 11:42:26 +0200 Subject: Link parsing (#120) * add link parsing + formatting functionality * refinement + docs * add missing test * credit url library --- internal/text/plain.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/text/plain.go') 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 := >smodel.Account{} -- cgit v1.2.3