AFAIK that’s a bad move because: Deprecate blackfriday #6487.
Let me simplify my suggestion:
{{ $footnoteReturnLink = (printf "${1}%s${2}" "SOMETHING") }}
{{ .Content | replaceRE "(<a (?:.*) class=\"footnote-backref\" (?:.*)>)(?:.*)(</a>)" $footnoteReturnLink | safeHTML }}
Basically I’m rendering the .Content
, but using replaceRE
to capture 2 groups, the portion before and after the footnote return link icon. Then I’m replacing it with “something” (but re-inserting the 2 captured groups).