thedroth-rocks/themes/PaperMod/layouts/partials/anchored_headings.html

3 lines
212 B
HTML
Raw Permalink Normal View History

2023-07-10 10:54:15 +03: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 }}