diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-10-14 10:49:28 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-10-14 10:49:28 +0200 |
commit | 246063fb7cd21a83beae5934f95b2795fb85df51 (patch) | |
tree | 5f82a11d17ea5468376693c7a0405ed71d7ae147 /tests/xxx_mdx_plugin_recma_jsx_rewrite.rs | |
parent | 9cc1ad4a90616b7fb4ae7b425a5b9844887f4584 (diff) | |
download | markdown-rs-246063fb7cd21a83beae5934f95b2795fb85df51.tar.gz markdown-rs-246063fb7cd21a83beae5934f95b2795fb85df51.tar.bz2 markdown-rs-246063fb7cd21a83beae5934f95b2795fb85df51.zip |
Refactor to use default trait in tests
Diffstat (limited to 'tests/xxx_mdx_plugin_recma_jsx_rewrite.rs')
-rw-r--r-- | tests/xxx_mdx_plugin_recma_jsx_rewrite.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/xxx_mdx_plugin_recma_jsx_rewrite.rs b/tests/xxx_mdx_plugin_recma_jsx_rewrite.rs index 9b9a4bc..d78e5c8 100644 --- a/tests/xxx_mdx_plugin_recma_jsx_rewrite.rs +++ b/tests/xxx_mdx_plugin_recma_jsx_rewrite.rs @@ -3,7 +3,7 @@ extern crate swc_common; extern crate swc_ecma_ast; extern crate swc_ecma_codegen; mod test_utils; -use markdown::{to_mdast, Constructs, Location, ParseOptions}; +use markdown::{to_mdast, Location, ParseOptions}; use pretty_assertions::assert_eq; use test_utils::{ hast_util_to_swc::hast_util_to_swc, @@ -18,10 +18,9 @@ fn from_markdown(value: &str, options: &RewriteOptions) -> Result<String, String let mdast = to_mdast( value, &ParseOptions { - constructs: Constructs::mdx(), mdx_esm_parse: Some(Box::new(parse_esm)), mdx_expression_parse: Some(Box::new(parse_expression)), - ..ParseOptions::default() + ..ParseOptions::mdx() }, )?; let hast = mdast_util_to_hast(&mdast); |