Skip to content

Commit 3c389a9

Browse files
Update Heading.svelte
1 parent 0c65a80 commit 3c389a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/markdoc/nodes/Heading.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@
8181
class:web-snap-location-references={id && inReferences}
8282
class="{headingClass} text-primary scroll-m-32 font-medium"
8383
>
84-
<a href={`#${href}`} class="">{@render children()}</a>
84+
<a href={`#${id ?? slugify(element?.innerText ?? '')}`} class="">{@render children()}</a>
8585
</svelte:element>

0 commit comments

Comments
 (0)