Commit 10e73b8d authored by Cyrille Chopelet's avatar Cyrille Chopelet

[Hugo] Use heading render hooks rather than regex

parent ed4042d3
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}&nbsp;<a class="anchor" href="#{{ .Anchor | safeURL }}">#</a></h{{ .Level }}>
{{ .Render "single/content-header" }}
{{ partial "title-anchors.html" .Content }}
{{ .Content }}
{{ .Render "single/content-footer" }}
{{ . | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" `${1}&nbsp;<a class="anchor" href="#${2}">#</a> ${3}` | safeHTML }}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment