Skip to content

Commit abeb16c

Browse files
authored
1 parent 6ab8fab commit abeb16c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}<a class="headerlink" href="#{{ .Anchor | safeURL }}" title="Link to this heading">#</a></h{{ .Level }}>
1+
{{ $id := .Anchor | anchorize -}}
2+
{{- $anchor := printf "#%s" $id -}}
3+
<h{{ .Level }} id="{{ $id }}">{{ .Text | safeHTML }}<a class="headerlink" {{ printf "href=%q" $anchor | safeHTMLAttr }} title="Link to this heading">#</a></h{{ .Level }}>

0 commit comments

Comments
 (0)