diff options
| author | 2024-02-05 09:50:35 +0000 | |
|---|---|---|
| committer | 2024-02-05 09:50:35 +0000 | |
| commit | a482cb59f2c9e29c133c4b864cc1e32af1fb99a7 (patch) | |
| tree | 65778a279d5aa84d53f1a997a958e8f42c64e981 /vendor/github.com/yuin/goldmark/extension/linkify.go | |
| parent | [chore] bump activity dependency -> v1.6.0-gts (#2599) (diff) | |
| download | gotosocial-a482cb59f2c9e29c133c4b864cc1e32af1fb99a7.tar.xz | |
[chore]: Bump github.com/yuin/goldmark from 1.6.0 to 1.7.0 (#2603)
Diffstat (limited to 'vendor/github.com/yuin/goldmark/extension/linkify.go')
| -rw-r--r-- | vendor/github.com/yuin/goldmark/extension/linkify.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vendor/github.com/yuin/goldmark/extension/linkify.go b/vendor/github.com/yuin/goldmark/extension/linkify.go index 0f23e907d..ad88933ac 100644 --- a/vendor/github.com/yuin/goldmark/extension/linkify.go +++ b/vendor/github.com/yuin/goldmark/extension/linkify.go @@ -66,10 +66,12 @@ func (o *withLinkifyAllowedProtocols) SetLinkifyOption(p *LinkifyConfig) { // WithLinkifyAllowedProtocols is a functional option that specify allowed // protocols in autolinks. Each protocol must end with ':' like // 'http:' . -func WithLinkifyAllowedProtocols(value [][]byte) LinkifyOption { - return &withLinkifyAllowedProtocols{ - value: value, +func WithLinkifyAllowedProtocols[T []byte | string](value []T) LinkifyOption { + opt := &withLinkifyAllowedProtocols{} + for _, v := range value { + opt.value = append(opt.value, []byte(v)) } + return opt } type withLinkifyURLRegexp struct { |
