diff options
| author | 2022-07-18 16:31:14 +0200 | |
|---|---|---|
| committer | 2022-07-18 16:31:14 +0200 | |
| commit | 5403261e8213f68633a09fc3e9bc2e6e2cd777b2 (patch) | |
| tree | bb3a6419ef42f7611c2cb24fe7024228f579331b /tests/thematic_break.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/thematic_break.rs')
| -rw-r--r-- | tests/thematic_break.rs | 22 | 
1 files changed, 15 insertions, 7 deletions
diff --git a/tests/thematic_break.rs b/tests/thematic_break.rs index 0cedada..1bb66cc 100644 --- a/tests/thematic_break.rs +++ b/tests/thematic_break.rs @@ -1,5 +1,5 @@  extern crate micromark; -use micromark::micromark; +use micromark::{micromark, micromark_with_options, Constructs, Options};  #[test]  fn thematic_break() { @@ -165,10 +165,18 @@ fn thematic_break() {          "should not support lazyness (2)"      ); -    // To do: turning things off. -    // assert_eq!( -    //   micromark("***", {extensions: [{disable: {null: ["thematicBreak"]}}]}), -    //   "<p>***</p>", -    //   "should support turning off thematic breaks" -    // ); +    assert_eq!( +        micromark_with_options( +            "***", +            &Options { +                constructs: Constructs { +                    thematic_break: false, +                    ..Constructs::default() +                }, +                ..Options::default() +            } +        ), +        "<p>***</p>", +        "should support turning off thematic breaks" +    );  }  | 
