diff options
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 |
