mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:52:24 -05:00
Link parsing (#120)
* add link parsing + formatting functionality * refinement + docs * add missing test * credit url library
This commit is contained in:
parent
fddacdd1a8
commit
ea8ad8b346
9 changed files with 434 additions and 51 deletions
|
|
@ -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{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue