Skip to content

Commit 1ea10f3

Browse files
committed
include anchor links while rendering headings
Signed-off-by: Weru <[email protected]>
1 parent 1adb685 commit 1ea10f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<h{{ .Level }} id="{{ .Anchor }}">
2+
{{ .Text | safeHTML }}
3+
<a href="#{{ .Anchor }}">
4+
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"></path><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"></path></svg>
5+
</a>
6+
</h{{ .Level }}>

0 commit comments

Comments
 (0)