diff options
author | 2021-04-01 16:34:11 -0400 | |
---|---|---|
committer | 2021-04-01 16:34:11 -0400 | |
commit | 54ba9f5ee17a68f0e5a917011ce696de397220dc (patch) | |
tree | 84f71153562f42c42870058b3d717f52cd338fa3 /test/astro-markdown.test.js | |
parent | 397b7145cc5d6008165af74a020ff7af3a8cace7 (diff) | |
download | astro-54ba9f5ee17a68f0e5a917011ce696de397220dc.tar.gz astro-54ba9f5ee17a68f0e5a917011ce696de397220dc.tar.zst astro-54ba9f5ee17a68f0e5a917011ce696de397220dc.zip |
Fix complex MDX parsing (#50)
* Fix complex MDX parsing
This allows fully MDX support using the micromark MDX extension. One caveat is that if you do something like use the less than sign, you need to escape it because the parser expects these to be tags otherwise.
* Move micromark definition
Diffstat (limited to 'test/astro-markdown.test.js')
-rw-r--r-- | test/astro-markdown.test.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/astro-markdown.test.js b/test/astro-markdown.test.js index a07f692c0..572569466 100644 --- a/test/astro-markdown.test.js +++ b/test/astro-markdown.test.js @@ -42,4 +42,12 @@ Markdown('Can load markdown pages with hmx', async () => { assert.ok($('#test').length, 'There is a div added via a component from markdown'); }); +Markdown('Can load more complex jsxy stuff', async () => { + const result = await runtime.load('/complex'); + + const $ = doc(result.contents); + const $el = $('#test'); + assert.equal($el.text(), 'Hello world'); +}); + Markdown.run(); |