diff options
author | Ferdinand Thiessen <rpm@fthiessen.de> | 2022-07-26 10:59:05 +0300 |
---|---|---|
committer | Ferdinand Thiessen <rpm@fthiessen.de> | 2022-07-29 17:07:56 +0300 |
commit | 22dbde70bca429a6913d072888e9c31679069406 (patch) | |
tree | 8e7f87d68dabc518528d1df199baefc1a6473530 /src/tests | |
parent | 9642367e94ff22877b153b091bb5997f8c10efb7 (diff) |
Added tests for the front matter node
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/markdown.spec.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/markdown.spec.js b/src/tests/markdown.spec.js index ae7ed3cfe..ca4b26436 100644 --- a/src/tests/markdown.spec.js +++ b/src/tests/markdown.spec.js @@ -192,4 +192,10 @@ describe('Markdown serializer from html', () => { `<p class="callout warning">!warning!</p>` )).toBe(`::: warn\n!warning!\n\n:::`) }) + + test('front matter', () => { + expect(markdownThroughEditorHtml('<pre id="frontmatter"><code>some: value</code></pre><h1>Heading</h1>')).toBe('---\nsome: value\n---\n\n# Heading') + // Test --- within front matter is allowed + expect(markdownThroughEditorHtml('<pre id="frontmatter"><code>---</code></pre><h1>Heading</h1>')).toBe('----\n---\n----\n\n# Heading') + }) }) |