mirror of
https://github.com/msfjarvis/msfjarvis.dev.git
synced 2024-06-03 04:18:56 +05:30
Linkify headings directly
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
0a1e0664cf
commit
b7ac3a1afc
|
@ -13,7 +13,7 @@
|
|||
{{ end }}
|
||||
</p>
|
||||
{{- with .Content -}}
|
||||
{{ . | replaceRE "(<h[1-2] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor"> 🔗︎</a> ${3}` | safeHTML }}
|
||||
{{ . | replaceRE "(<h[1-2] id=\"([^\"]+)\".+)(</h[1-9]+>)" `<a href="#${2}" class="hanchor" ariaLabel="Anchor"> ${1}</a> ${3}` | safeHTML }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user