From cd5bb2d16c6b28332b0b6077b27b2b90a8051896 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 6 Oct 2022 15:57:55 +0200 Subject: Refactor to split parse from compile options --- tests/mdx_jsx_flow.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'tests/mdx_jsx_flow.rs') 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, -- cgit