Customize footnote backlink text in Goldmark

I’ve been able to customize the Footnote Return Link while using Goldmark Goldmark, and IIRC this code is responsible for that:

        <!-- Print the Content but replace the Footnote return link -->
        {{ $footnoteReturnLink := (printf "${1}%s${2}" "↥↥") }}
        {{ .Content | replaceRE "(<a (?:.*) class=\"footnote-backref\" (?:.*)>)(?:.*)(</a>)" $footnoteReturnLink | safeHTML }}

I put this code in single.html where the post content is being called.

See live at the bottom of https://roneo.org/markdown
Source: Controlling Goldmark footnote rendering - #5 by sephore

1 Like