Added heading links to URL fragments

This commit is contained in:
Steven Engler
2019-09-17 14:22:13 -04:00
parent 52526aa5b6
commit c469a64a65
3 changed files with 119 additions and 1 deletions

View File

@ -27,5 +27,5 @@
</details>
</div>
{{ end }}
{{ .Content }}
{{ .Content | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" (printf "${1}<a href=\"#${2}\" class=\"heading-anchor\" aria-label=\"Anchor\"><img src=\"%s\" class=\"color-adapting-image\" height=\"20\"></a>${3}" ("images/chain-link.svg" | relURL)) | safeHTML }}
{{ end }}