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/footnote.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/footnote.go')
| -rw-r--r-- | vendor/github.com/yuin/goldmark/extension/footnote.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/vendor/github.com/yuin/goldmark/extension/footnote.go b/vendor/github.com/yuin/goldmark/extension/footnote.go index d1b67aa77..2e225269c 100644 --- a/vendor/github.com/yuin/goldmark/extension/footnote.go +++ b/vendor/github.com/yuin/goldmark/extension/footnote.go @@ -382,8 +382,8 @@ func (o *withFootnoteIDPrefix) SetFootnoteOption(c *FootnoteConfig) { } // WithFootnoteIDPrefix is a functional option that is a prefix for the id attributes generated by footnotes. -func WithFootnoteIDPrefix(a []byte) FootnoteOption { - return &withFootnoteIDPrefix{a} +func WithFootnoteIDPrefix[T []byte | string](a T) FootnoteOption { + return &withFootnoteIDPrefix{[]byte(a)} } const optFootnoteIDPrefixFunction renderer.OptionName = "FootnoteIDPrefixFunction" @@ -420,8 +420,8 @@ func (o *withFootnoteLinkTitle) SetFootnoteOption(c *FootnoteConfig) { } // WithFootnoteLinkTitle is a functional option that is an optional title attribute for footnote links. -func WithFootnoteLinkTitle(a []byte) FootnoteOption { - return &withFootnoteLinkTitle{a} +func WithFootnoteLinkTitle[T []byte | string](a T) FootnoteOption { + return &withFootnoteLinkTitle{[]byte(a)} } const optFootnoteBacklinkTitle renderer.OptionName = "FootnoteBacklinkTitle" @@ -439,8 +439,8 @@ func (o *withFootnoteBacklinkTitle) SetFootnoteOption(c *FootnoteConfig) { } // WithFootnoteBacklinkTitle is a functional option that is an optional title attribute for footnote backlinks. -func WithFootnoteBacklinkTitle(a []byte) FootnoteOption { - return &withFootnoteBacklinkTitle{a} +func WithFootnoteBacklinkTitle[T []byte | string](a T) FootnoteOption { + return &withFootnoteBacklinkTitle{[]byte(a)} } const optFootnoteLinkClass renderer.OptionName = "FootnoteLinkClass" @@ -458,8 +458,8 @@ func (o *withFootnoteLinkClass) SetFootnoteOption(c *FootnoteConfig) { } // WithFootnoteLinkClass is a functional option that is a class for footnote links. -func WithFootnoteLinkClass(a []byte) FootnoteOption { - return &withFootnoteLinkClass{a} +func WithFootnoteLinkClass[T []byte | string](a T) FootnoteOption { + return &withFootnoteLinkClass{[]byte(a)} } const optFootnoteBacklinkClass renderer.OptionName = "FootnoteBacklinkClass" @@ -477,8 +477,8 @@ func (o *withFootnoteBacklinkClass) SetFootnoteOption(c *FootnoteConfig) { } // WithFootnoteBacklinkClass is a functional option that is a class for footnote backlinks. -func WithFootnoteBacklinkClass(a []byte) FootnoteOption { - return &withFootnoteBacklinkClass{a} +func WithFootnoteBacklinkClass[T []byte | string](a T) FootnoteOption { + return &withFootnoteBacklinkClass{[]byte(a)} } const optFootnoteBacklinkHTML renderer.OptionName = "FootnoteBacklinkHTML" @@ -496,8 +496,8 @@ func (o *withFootnoteBacklinkHTML) SetFootnoteOption(c *FootnoteConfig) { } // WithFootnoteBacklinkHTML is an HTML content for footnote backlinks. -func WithFootnoteBacklinkHTML(a []byte) FootnoteOption { - return &withFootnoteBacklinkHTML{a} +func WithFootnoteBacklinkHTML[T []byte | string](a T) FootnoteOption { + return &withFootnoteBacklinkHTML{[]byte(a)} } // FootnoteHTMLRenderer is a renderer.NodeRenderer implementation that |
