PaperModX/layouts/partials/anchored_headings.html

3 lines
213 B
HTML
Raw Normal View History

2021-03-30 13:37:36 +01:00
{{- /* formats .Content headings by adding an anchor */ -}}
{{ . | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" "${1}<a hidden class=\"anchor\" aria-hidden=\"true\" href=\"#${2}\"></a>${3}" | safeHTML }}