mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 02:22:24 -05:00
Link hashtag bug (#121)
* link + hashtag bug * remove printlns * tidy up some duplicated code
This commit is contained in:
parent
ea8ad8b346
commit
a940a520d3
15 changed files with 349 additions and 97 deletions
|
|
@ -82,7 +82,7 @@ func contains(urls []*url.URL, url *url.URL) bool {
|
|||
// Note: because Go doesn't allow negative lookbehinds in regex, it's possible that an already-formatted
|
||||
// href will end up double-formatted, if the text you pass here contains one or more hrefs already.
|
||||
// To avoid this, you should sanitize any HTML out of text before you pass it into this function.
|
||||
func ReplaceLinks(in string) string {
|
||||
func (f *formatter) ReplaceLinks(in string) string {
|
||||
rxStrict, err := xurls.StrictMatchingScheme(schemes)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue