Use with where possible

This commit is contained in:
Will Faught
2022-12-13 22:08:04 -08:00
parent e0ddce45e4
commit ff587e94e0
10 changed files with 31 additions and 31 deletions

View File

@@ -1,3 +1,3 @@
{{ if .Content }}
{{ .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 }}
{{ 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 }}
{{ end }}