diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-10-14 09:35:42 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-10-14 09:35:42 +0200 |
commit | 930630506c6d42250b5fe6b883ac65b2e9ba668b (patch) | |
tree | 8eacad920edcd9db6e303ec6c4be67b1d3aae96b /tests/mdx_jsx_flow.rs | |
parent | 6263c957b09eb559d68ce4251bdc94426a3b1b0c (diff) | |
download | markdown-rs-930630506c6d42250b5fe6b883ac65b2e9ba668b.tar.gz markdown-rs-930630506c6d42250b5fe6b883ac65b2e9ba668b.tar.bz2 markdown-rs-930630506c6d42250b5fe6b883ac65b2e9ba668b.zip |
Add some more tests on mdx and indented code
Diffstat (limited to '')
-rw-r--r-- | tests/mdx_jsx_flow.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/mdx_jsx_flow.rs b/tests/mdx_jsx_flow.rs index 85abcd3..337b4cd 100644 --- a/tests/mdx_jsx_flow.rs +++ b/tests/mdx_jsx_flow.rs @@ -30,6 +30,7 @@ fn mdx_jsx_flow_agnostic() -> Result<(), String> { &Options { parse: ParseOptions { constructs: Constructs { + html_flow: false, mdx_jsx_flow: true, ..Constructs::default() }, @@ -43,6 +44,25 @@ fn mdx_jsx_flow_agnostic() -> Result<(), String> { ); assert_eq!( + to_html_with_options( + " <a />", + &Options { + parse: ParseOptions { + constructs: Constructs { + html_flow: false, + mdx_jsx_flow: true, + ..Constructs::default() + }, + ..ParseOptions::default() + }, + ..Options::default() + } + )?, + "", + "should support indented jsx if indented code is enabled" + ); + + assert_eq!( to_html_with_options("<a></a>", &mdx)?, "", "should support a closed element" |