mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-06 02:13:17 -06:00
changing more stuff
This commit is contained in:
parent
29b4adfb69
commit
0f7cfa75f3
126 changed files with 1060 additions and 920 deletions
|
|
@ -19,6 +19,7 @@
|
|||
package text
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
|
|
@ -82,7 +83,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 (f *formatter) ReplaceLinks(in string) string {
|
||||
func (f *formatter) ReplaceLinks(ctx context.Context, in string) string {
|
||||
rxStrict, err := xurls.StrictMatchingScheme(schemes)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue