diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-09-09 16:21:36 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-09-09 16:21:36 +0200 |
commit | aadec72880363669fb909116e834e26c4ca0adb2 (patch) | |
tree | c38bbb91f96d859b217a381f2acf395b845ab096 /examples/lib.rs | |
parent | 9fbc5edf2a78ebc733732b7fa6fc40acd3bf978b (diff) | |
download | markdown-rs-aadec72880363669fb909116e834e26c4ca0adb2.tar.gz markdown-rs-aadec72880363669fb909116e834e26c4ca0adb2.tar.bz2 markdown-rs-aadec72880363669fb909116e834e26c4ca0adb2.zip |
Add mdx example
Diffstat (limited to 'examples/lib.rs')
-rw-r--r-- | examples/lib.rs | 14 |
1 files changed, 14 insertions, 0 deletions
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( + "# <HelloMessage />, {username}!", + &Options { + constructs: Constructs::mdx(), + gfm_tagfilter: true, + ..Options::default() + } + )? + ); + // Support other extensions that are not in CommonMark. println!( "{:?}", |