anchored-headings: init partial

Signed-off-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
This commit is contained in:
Jake Wiesler 2020-06-04 15:13:42 -04:00 committed by Aditya Telange
parent 8574c385cd
commit 2b0619f684
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
1 changed files with 2 additions and 0 deletions

View File

@ -0,0 +1,2 @@
<!-- formats .Content headings by adding an anchor -->
{{ . | replaceRE "(<h[2-3] id=\"([^\"]+)\".+)(</h[2-9]+>)" "${1}<a class=\"anchor\" href=\"#${2}\">#</a>${3}" | safeHTML }}