Merge pull request #18168 from dvdksn/fix-clean-heading-markup

fix: remove anchor markup from heading innerhtml
This commit is contained in:
David Karlsson
2023-09-15 11:08:42 +02:00
committed by GitHub

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 }}>