Limit header tag number range

This commit is contained in:
Will Faught
2022-12-13 22:14:42 -08:00
parent a24c878c55
commit e6afd4e29e

View File

@@ -1,3 +1,3 @@
{{ with .Content }}
{{ . | replaceRE `(<h[1-9] id="([^"]+)".+)(</h[1-9]+>)` `${1}<a class="headerlink" href="#${2}"><i class="bi bi-link-45deg small"></i></a>${3}` | safeHTML }}
{{ . | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` `${1}<a class="headerlink" href="#${2}"><i class="bi bi-link-45deg small"></i></a>${3}` | safeHTML }}
{{ end }}