fix: remove anchor markup from heading innerhtml

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2023-09-12 17:27:13 +02:00
parent e17d44a423
commit 75aee1d058
1 changed files with 4 additions and 9 deletions

View File

@ -1,12 +1,7 @@
{{ $id := .id | default (anchorize (plainify .text)) }}
<a class="relative -top-16" name="{{ $id }}"></a>
<h{{ .level }}
{{ with .class }}
class="{{ . }}"
{{ end }}
>
<span class="group not-prose">
<a class="text-black dark:text-white no-underline group-hover:underline" href="#{{ $id }}">{{ .text }}</a>
<span class="invisible group-hover:visible material-symbols-rounded">link</span>
</span>
<h{{ .level }} {{ with .class }} class="{{ . }}" {{ end }}>
<a class="text-black dark:text-white no-underline hover:underline" href="#{{ $id }}">
{{ .text }}
</a>
</h{{ .level }}>