diff options
author | 2021-07-28 11:42:26 +0200 | |
---|---|---|
committer | 2021-07-28 11:42:26 +0200 | |
commit | ea8ad8b346978b04b067eead8e1f2bbc3c1bfb45 (patch) | |
tree | ce500bce803f944702677c29d83a9ae858246376 /internal/text/plain.go | |
parent | build and bundle admin console + web assets (#119) (diff) | |
download | gotosocial-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.go | 3 |
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 := >smodel.Account{} |