mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 12:52:24 -06:00
some more hacking away at the timeline code phew
This commit is contained in:
parent
96048d7f07
commit
86fd23ccd9
8 changed files with 49 additions and 45 deletions
|
|
@ -21,7 +21,6 @@ func (p *processor) Create(account *gtsmodel.Account, application *gtsmodel.Appl
|
|||
ID: thisStatusID,
|
||||
URI: thisStatusURI,
|
||||
URL: thisStatusURL,
|
||||
Content: util.HTMLFormat(form.Status),
|
||||
CreatedAt: time.Now(),
|
||||
UpdatedAt: time.Now(),
|
||||
Local: true,
|
||||
|
|
|
|||
|
|
@ -248,6 +248,12 @@ func (p *processor) processContent(form *apimodel.AdvancedStatusCreateForm, acco
|
|||
}
|
||||
}
|
||||
|
||||
// format tags nicely
|
||||
for _, tag := range status.GTSTags {
|
||||
tagContent := fmt.Sprintf(`<a href="%s" class="mention hashtag" rel="tag">#<span>%s</span></a>`, tag.URL, tag.Name)
|
||||
content = strings.ReplaceAll(content, fmt.Sprintf("#%s", tag.Name), tagContent)
|
||||
}
|
||||
|
||||
// replace newlines with breaks
|
||||
content = strings.ReplaceAll(content, "\n", "<br />")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue