aboutsummaryrefslogtreecommitdiffstats
path: root/tests/xxx_mdx_plugin_recma_document.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-14 10:49:28 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-14 10:49:28 +0200
commit246063fb7cd21a83beae5934f95b2795fb85df51 (patch)
tree5f82a11d17ea5468376693c7a0405ed71d7ae147 /tests/xxx_mdx_plugin_recma_document.rs
parent9cc1ad4a90616b7fb4ae7b425a5b9844887f4584 (diff)
downloadmarkdown-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_document.rs')
-rw-r--r--tests/xxx_mdx_plugin_recma_document.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/xxx_mdx_plugin_recma_document.rs b/tests/xxx_mdx_plugin_recma_document.rs
index de25699..9fdd053 100644
--- a/tests/xxx_mdx_plugin_recma_document.rs
+++ b/tests/xxx_mdx_plugin_recma_document.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,
@@ -17,10 +17,9 @@ fn from_markdown(value: &str) -> 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);