mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2026-05-21 11:05:49 +00:00
style(anchored_headings): refactor for better readability
This commit is contained in:
@@ -1,2 +1,6 @@
|
||||
{{- /* 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 }}
|
||||
{{ . | replaceRE
|
||||
"(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)"
|
||||
"${1}<a hidden class=\"anchor\" aria-hidden=\"true\" href=\"#${2}\">#</a>${3}"
|
||||
| safeHTML
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user