diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-10-06 15:57:55 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-10-06 15:57:55 +0200 |
commit | cd5bb2d16c6b28332b0b6077b27b2b90a8051896 (patch) | |
tree | 848ebc6200b80d2dfdcd67bf0bb245eea06bb24f /tests/mdx_jsx_flow.rs | |
parent | 6e80e03bb6d6af47aba2b339f160e4895ab5afba (diff) | |
download | markdown-rs-cd5bb2d16c6b28332b0b6077b27b2b90a8051896.tar.gz markdown-rs-cd5bb2d16c6b28332b0b6077b27b2b90a8051896.tar.bz2 markdown-rs-cd5bb2d16c6b28332b0b6077b27b2b90a8051896.zip |
Refactor to split parse from compile options
Diffstat (limited to 'tests/mdx_jsx_flow.rs')
-rw-r--r-- | tests/mdx_jsx_flow.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/mdx_jsx_flow.rs b/tests/mdx_jsx_flow.rs index 54914e6..46d2559 100644 --- a/tests/mdx_jsx_flow.rs +++ b/tests/mdx_jsx_flow.rs @@ -3,14 +3,17 @@ use micromark::{ mdast::{List, ListItem, MdxJsxFlowElement, Node, Paragraph, Root, Text}, micromark_to_mdast, micromark_with_options, unist::Position, - Constructs, Options, + Constructs, Options, ParseOptions, }; use pretty_assertions::assert_eq; #[test] fn mdx_jsx_flow_agnostic() -> Result<(), String> { let mdx = Options { - constructs: Constructs::mdx(), + parse: ParseOptions { + constructs: Constructs::mdx(), + ..ParseOptions::default() + }, ..Options::default() }; @@ -52,7 +55,10 @@ fn mdx_jsx_flow_agnostic() -> Result<(), String> { #[test] fn mdx_jsx_flow_essence() -> Result<(), String> { let mdx = Options { - constructs: Constructs::mdx(), + parse: ParseOptions { + constructs: Constructs::mdx(), + ..ParseOptions::default() + }, ..Options::default() }; @@ -147,7 +153,7 @@ fn mdx_jsx_flow_essence() -> Result<(), String> { ); assert_eq!( - micromark_to_mdast("<>\n * a\n</>", &mdx)?, + micromark_to_mdast("<>\n * a\n</>", &mdx.parse)?, Node::Root(Root { children: vec![Node::MdxJsxFlowElement(MdxJsxFlowElement { name: None, |