Skip to content

Commit 20ec066

Browse files
committed
📸 Update snapshots for heading IDs
1 parent 72c9ffa commit 20ec066

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

‎test/__snapshots__/markdoc-parsing.test.ts.snap‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exports[`Markdown parsing > properly parses CommonMark 1`] = `
66
export const slug = "test";
77
export const headings = [{"level":1,"title":"Heading Level 1","id":"heading-level-1"},{"level":2,"title":"Heading Level 2","id":"heading-level-2"},{"level":3,"title":"Heading Level 3","id":"heading-level-3"},{"level":4,"title":"Heading Level 4","id":"heading-level-4"},{"level":5,"title":"Heading Level 5","id":"heading-level-5"},{"level":6,"title":"Heading Level 6","id":"heading-level-6"},{"level":2,"title":"Stext Heading","id":"stext-heading"},{"level":3,"title":"Tabs","id":"tabs"},{"level":3,"title":"Special Characters","id":"special-characters"},{"level":3,"title":"Backslash-Escaped Characters","id":"backslash-escaped-characters"},{"level":1,"title":"Hash","id":"hash"},{"level":3,"title":"Valid HTML Entities or Numeric Characters","id":"valid-html-entities-or-numeric-characters"},{"level":3,"title":"Indented Code Block","id":"indented-code-block"},{"level":3,"title":"HTML Block","id":"html-block"},{"level":3,"title":"Indented Code Fence","id":"indented-code-fence"},{"level":3,"title":"Inline Code Example in Another Block","id":"inline-code-example-in-another-block"}];
88
</script>
9-
<article><h1>Heading Level 1</h1><h2>Heading Level 2</h2><h3>Heading Level 3</h3><h4>Heading Level 4</h4><h5>Heading Level 5</h5><h6>Heading Level 6</h6><h2>Stext Heading</h2><p>This is a heading specifically for testing <strong>strong text</strong> (stext) within a heading.</p><p>This is a paragraph. It contains some text content to demonstrate how paragraphs work in Markdown.</p><hr /><p>This is a horizontal rule (HR) using three dashes.</p><hr /><p>This is a horizontal rule (HR) using three asterisks.</p><hr /><p>This is a horizontal rule (HR) using three underscores.</p><p><img src="https://example.com/image.jpg" alt="Alt text for the image" title="Image Title" /></p><pre data-language="javascript"><code>// Fenced code block with Markdoc brackets &lcub;&rcub; and multiple linesconst obj = &lcub; key: 'value' &rcub;;console.log(\`Hello, &lcub;world&rcub;! Template: $&lcub;obj.key&rcub;\`);function test() &lcub; return &lcub; nested: true &rcub;;&rcub;</code></pre><blockquote><p>This is a blockquote. It can span multiple lines.</p></blockquote><ol><li>Ordered list item 1</li><li>Ordered list item 2</li></ol><ul><li>Unordered sublist item 1</li><li>Unordered sublist item 2</li></ul><ol start="3"><li>Ordered list item 3</li></ol><ul><li>Unordered list item 1</li><li>Unordered list item 2<ol><li>Ordered sublist item 1</li><li>Ordered sublist item 2</li></ol></li><li>Unordered list item 3</li></ul><p>This is <strong>strong text</strong>. This is <em>emphasized text</em>. This is <s>strikethrough text</s>.</p><p>This is a <a href="https://example.com" title="Link Title">link</a> to an external website. This is a <a href="https://example.com/tricky" title="Title with &lt; &gt; &amp; &quot; ' characters">link with tricky chars in title</a> testing attribute escaping.</p><p>Here is some <code>inline code</code> within a sentence. Here is inline code with brackets: <code>&lcub; example: true &rcub;</code>.</p><p>This is a line of text. This is another line of text after a hard break.</p><p>This is a line of text with a soft break and it continues on the next line.</p><h3>Tabs</h3><p>Here is a line with a tab: This line starts with a tab character.</p><h3>Special Characters</h3><p>Here are some special characters: <code>! @ # $ % ^ &amp; * ( ) - _ + = &lcub; &rcub; [ ] | : ; &quot; ' &lt; &gt; , . ? / ~</code></p><h3>Backslash-Escaped Characters</h3><p>Here are some backslash-escaped characters: \\ Backslash \` Backtick</p><ul><li>Asterisk _ Underscore { Curly brace open } Curly brace close [ Square bracket open ] Square bracket close ( Parenthesis open ) Parenthesis close</li></ul><h1>Hash</h1><ul><li>Plus</li></ul><ul><li>Minus . Period ! Exclamation mark</li></ul><h3>Valid HTML Entities or Numeric Characters</h3><p>Here are some valid HTML entities and numeric characters: © (©) ® (®) © (© using numeric code) ® (® using numeric code) & (&) < (<) > (>) " (") ' (')</p><h3>Indented Code Block</h3><p>// This is an indented code block with Markdoc brackets {} function greet() { const config = { enabled: true }; console.log("Hello from {indented} code block!", config); }</p><h3>HTML Block</h3><p><div> <p>This is a block of raw HTML.</p> <p>It will render as HTML if supported.</p> </div></p><h3>Indented Code Fence</h3><pre><code>// This is an indented code fence with &lcub;brackets&rcub;console.log(&quot;Indented &lcub;code&rcub; fence example&quot;);</code></pre><h3>Inline Code Example in Another Block</h3><p>Here is an example of inline code within a blockquote:</p><blockquote><p>This is a blockquote with <code>inline code</code> and <code>&lcub; bracketed: code &rcub;</code> inside it.</p></blockquote></article>",
9+
<article><h1 id="heading-level-1">Heading Level 1</h1><h2 id="heading-level-2">Heading Level 2</h2><h3 id="heading-level-3">Heading Level 3</h3><h4 id="heading-level-4">Heading Level 4</h4><h5 id="heading-level-5">Heading Level 5</h5><h6 id="heading-level-6">Heading Level 6</h6><h2 id="stext-heading">Stext Heading</h2><p>This is a heading specifically for testing <strong>strong text</strong> (stext) within a heading.</p><p>This is a paragraph. It contains some text content to demonstrate how paragraphs work in Markdown.</p><hr /><p>This is a horizontal rule (HR) using three dashes.</p><hr /><p>This is a horizontal rule (HR) using three asterisks.</p><hr /><p>This is a horizontal rule (HR) using three underscores.</p><p><img src="https://example.com/image.jpg" alt="Alt text for the image" title="Image Title" /></p><pre data-language="javascript"><code>// Fenced code block with Markdoc brackets &lcub;&rcub; and multiple linesconst obj = &lcub; key: 'value' &rcub;;console.log(\`Hello, &lcub;world&rcub;! Template: $&lcub;obj.key&rcub;\`);function test() &lcub; return &lcub; nested: true &rcub;;&rcub;</code></pre><blockquote><p>This is a blockquote. It can span multiple lines.</p></blockquote><ol><li>Ordered list item 1</li><li>Ordered list item 2</li></ol><ul><li>Unordered sublist item 1</li><li>Unordered sublist item 2</li></ul><ol start="3"><li>Ordered list item 3</li></ol><ul><li>Unordered list item 1</li><li>Unordered list item 2<ol><li>Ordered sublist item 1</li><li>Ordered sublist item 2</li></ol></li><li>Unordered list item 3</li></ul><p>This is <strong>strong text</strong>. This is <em>emphasized text</em>. This is <s>strikethrough text</s>.</p><p>This is a <a href="https://example.com" title="Link Title">link</a> to an external website. This is a <a href="https://example.com/tricky" title="Title with &lt; &gt; &amp; &quot; ' characters">link with tricky chars in title</a> testing attribute escaping.</p><p>Here is some <code>inline code</code> within a sentence. Here is inline code with brackets: <code>&lcub; example: true &rcub;</code>.</p><p>This is a line of text. This is another line of text after a hard break.</p><p>This is a line of text with a soft break and it continues on the next line.</p><h3 id="tabs">Tabs</h3><p>Here is a line with a tab: This line starts with a tab character.</p><h3 id="special-characters">Special Characters</h3><p>Here are some special characters: <code>! @ # $ % ^ &amp; * ( ) - _ + = &lcub; &rcub; [ ] | : ; &quot; ' &lt; &gt; , . ? / ~</code></p><h3 id="backslash-escaped-characters">Backslash-Escaped Characters</h3><p>Here are some backslash-escaped characters: \\ Backslash \` Backtick</p><ul><li>Asterisk _ Underscore { Curly brace open } Curly brace close [ Square bracket open ] Square bracket close ( Parenthesis open ) Parenthesis close</li></ul><h1 id="hash">Hash</h1><ul><li>Plus</li></ul><ul><li>Minus . Period ! Exclamation mark</li></ul><h3 id="valid-html-entities-or-numeric-characters">Valid HTML Entities or Numeric Characters</h3><p>Here are some valid HTML entities and numeric characters: © (©) ® (®) © (© using numeric code) ® (® using numeric code) & (&) < (<) > (>) " (") ' (')</p><h3 id="indented-code-block">Indented Code Block</h3><p>// This is an indented code block with Markdoc brackets {} function greet() { const config = { enabled: true }; console.log("Hello from {indented} code block!", config); }</p><h3 id="html-block">HTML Block</h3><p><div> <p>This is a block of raw HTML.</p> <p>It will render as HTML if supported.</p> </div></p><h3 id="indented-code-fence">Indented Code Fence</h3><pre><code>// This is an indented code fence with &lcub;brackets&rcub;console.log(&quot;Indented &lcub;code&rcub; fence example&quot;);</code></pre><h3 id="inline-code-example-in-another-block">Inline Code Example in Another Block</h3><p>Here is an example of inline code within a blockquote:</p><blockquote><p>This is a blockquote with <code>inline code</code> and <code>&lcub; bracketed: code &rcub;</code> inside it.</p></blockquote></article>",
1010
"dependencies": [],
1111
}
1212
`;
@@ -17,7 +17,7 @@ exports[`Markdown parsing > properly parses basic Markdoc 1`] = `
1717
export const slug = "test";
1818
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"}];
1919
</script>
20-
<article><h1>This is some basic Markdoc</h1><p>With a paragraph.</p><p>Some text <strong>in bold</strong> and <em>in italic</em>.</p><p>And a <a href="https://example.com">link</a>.</p><h2>More fancy stuff</h2><p>Some <code>&lt;p&gt;</code> inline code.</p><p>And a code block:</p><pre data-language="javascript"><code>&lcub;&lcub;% test %&rcub;&rcub;</code></pre><p>And even a table with a nested list:</p><table><thead><tr><th>Table header 1</th><th>Table header 2</th></tr></thead><tbody><tr><td><ul><li>Row 1 Cell 1 Item 1</li><li>Row 1 Cell 1 Item 2</li></ul></td><td>Row 1 Cell 2</td></tr><tr><td>Row 2 Cell 1</td><td>Row 2 cell 2</td></tr></tbody></table></article>",
20+
<article><h1 id="this-is-some-basic-markdoc">This is some basic Markdoc</h1><p>With a paragraph.</p><p>Some text <strong>in bold</strong> and <em>in italic</em>.</p><p>And a <a href="https://example.com">link</a>.</p><h2 id="more-fancy-stuff">More fancy stuff</h2><p>Some <code>&lt;p&gt;</code> inline code.</p><p>And a code block:</p><pre data-language="javascript"><code>&lcub;&lcub;% test %&rcub;&rcub;</code></pre><p>And even a table with a nested list:</p><table><thead><tr><th>Table header 1</th><th>Table header 2</th></tr></thead><tbody><tr><td><ul><li>Row 1 Cell 1 Item 1</li><li>Row 1 Cell 1 Item 2</li></ul></td><td>Row 1 Cell 2</td></tr><tr><td>Row 2 Cell 1</td><td>Row 2 cell 2</td></tr></tbody></table></article>",
2121
"dependencies": [],
2222
}
2323
`;

0 commit comments

Comments
 (0)