From aadec72880363669fb909116e834e26c4ca0adb2 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 9 Sep 2022 16:21:36 +0200 Subject: Add mdx example --- examples/lib.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'examples') diff --git a/examples/lib.rs b/examples/lib.rs index 17524b7..98089de 100644 --- a/examples/lib.rs +++ b/examples/lib.rs @@ -35,6 +35,20 @@ fn main() -> Result<(), String> { )? ); + // Support MDX extensions. + // Note: mdx compiles to nothing, handle it yourself. + println!( + "{}", + micromark_with_options( + "# , {username}!", + &Options { + constructs: Constructs::mdx(), + gfm_tagfilter: true, + ..Options::default() + } + )? + ); + // Support other extensions that are not in CommonMark. println!( "{:?}", -- cgit