diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-18 16:31:14 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-18 16:31:14 +0200 |
commit | 5403261e8213f68633a09fc3e9bc2e6e2cd777b2 (patch) | |
tree | bb3a6419ef42f7611c2cb24fe7024228f579331b /tests/heading_setext.rs | |
parent | 03544cafaa82ba4bd7e0bc3372fc59549a8dc0cc (diff) | |
download | markdown-rs-5403261e8213f68633a09fc3e9bc2e6e2cd777b2.tar.gz markdown-rs-5403261e8213f68633a09fc3e9bc2e6e2cd777b2.tar.bz2 markdown-rs-5403261e8213f68633a09fc3e9bc2e6e2cd777b2.zip |
Add support for turning off constructs
Diffstat (limited to 'tests/heading_setext.rs')
-rw-r--r-- | tests/heading_setext.rs | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/tests/heading_setext.rs b/tests/heading_setext.rs index 8d4a5b7..e8d1492 100644 --- a/tests/heading_setext.rs +++ b/tests/heading_setext.rs @@ -1,5 +1,5 @@ extern crate micromark; -use micromark::micromark; +use micromark::{micromark, micromark_with_options, Constructs, Options}; #[test] fn heading_setext() { @@ -256,10 +256,18 @@ fn heading_setext() { "should not support lazyness (2)" ); - // To do: turning things off. - // assert_eq!( - // micromark("a\n-", {extensions: [{disable: {null: ["setextUnderline"]}}]}), - // "<p>a\n-</p>", - // "should support turning off setext underlines" - // ); + assert_eq!( + micromark_with_options( + "a\n-", + &Options { + constructs: Constructs { + heading_setext: false, + ..Constructs::default() + }, + ..Options::default() + } + ), + "<p>a\n-</p>", + "should support turning off setext underlines" + ); } |