You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/__snapshots__/heading.test.ts.snap
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,3 +17,19 @@ exports[`Headings > adds IDs and exports headings even when the custom heading i
17
17
</script>
18
18
<article><HeadingComponentid="this-is-some-basic-markdoc">This is some basic Markdoc</HeadingComponent><p>With a paragraph.</p><HeadingComponentid="more-fancy-stuff">More fancy stuff</HeadingComponent><p>Content. Such great content.</p></article>"
19
19
`;
20
+
21
+
exports[`Headings > adds IDs when passed a custom slugifying function 1`] =`
22
+
"<scriptmodule>
23
+
export const slug = "test";
24
+
export const headings = [{"level":1,"title":"This is some basic Markdoc","id":"This-is-some-basic-Markdoc"},{"level":2,"title":"More fancy stuff","id":"More-fancy-stuff"}];
25
+
</script>
26
+
<article><h1id="This-is-some-basic-Markdoc">This is some basic Markdoc</h1><p>With a paragraph.</p><h2id="More-fancy-stuff">More fancy stuff</h2><p>Content. Such great content.</p></article>"
27
+
`;
28
+
29
+
exports[`Headings > adds IDs when passed a custom slugifying function even for custom headings 1`] =`
30
+
"<scriptmodule>
31
+
export const slug = "test";
32
+
export const headings = [{"level":1,"title":"This is some basic Markdoc","id":"This-is-some-basic-Markdoc"},{"level":1,"title":"More fancy stuff","id":"More-fancy-stuff"}];
33
+
</script>
34
+
<article><h1class="custom-heading"id="This-is-some-basic-Markdoc">This is some basic Markdoc</h1><p>With a paragraph.</p><h1class="custom-heading"id="More-fancy-stuff">More fancy stuff</h1><p>Content. Such great content.</p></article>"
0 commit comments