{{ $showAnchor := (and (default true .Page.Params.GeekblogAnchor) (default true .Site.Params.GeekblogAnchor)) }} {{ $.Scratch.Set "content" (.Content | replaceRE `` `` | safeHTML) }} {{ if $showAnchor }} {{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(]*>)(.*?)()" (printf `
%s%s%s
` `${1}` `${3}` (absURL (printf "%s#%s" .Permalink `${2}`)) `${3}` `${2}` `${4}`) | safeHTML) }} {{ end }} {{ $.Scratch.Get "content" }}