aboutsummaryrefslogtreecommitdiffstats
path: root/tests/block_quote.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-18 16:31:14 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-18 16:31:14 +0200
commit5403261e8213f68633a09fc3e9bc2e6e2cd777b2 (patch)
treebb3a6419ef42f7611c2cb24fe7024228f579331b /tests/block_quote.rs
parent03544cafaa82ba4bd7e0bc3372fc59549a8dc0cc (diff)
downloadmarkdown-rs-5403261e8213f68633a09fc3e9bc2e6e2cd777b2.tar.gz
markdown-rs-5403261e8213f68633a09fc3e9bc2e6e2cd777b2.tar.bz2
markdown-rs-5403261e8213f68633a09fc3e9bc2e6e2cd777b2.zip
Add support for turning off constructs
Diffstat (limited to 'tests/block_quote.rs')
-rw-r--r--tests/block_quote.rs24
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/block_quote.rs b/tests/block_quote.rs
index 06bd49a..13af078 100644
--- a/tests/block_quote.rs
+++ b/tests/block_quote.rs
@@ -1,5 +1,5 @@
extern crate micromark;
-use micromark::micromark;
+use micromark::{micromark, micromark_with_options, Constructs, Options};
#[test]
fn block_quote() {
@@ -165,12 +165,18 @@ fn block_quote() {
"should support 5 spaces for indented code, not 4"
);
- // To do: turning things off.
- // assert_eq!(
- // micromark("> # a\n> b\n> c", {
- // extensions: [{disable: {null: ["blockQuote"]}}]
- // }),
- // "<p>&gt; # a\n&gt; b\n&gt; c</p>",
- // "should support turning off block quotes"
- // );
+ assert_eq!(
+ micromark_with_options(
+ "> # a\n> b\n> c",
+ &Options {
+ constructs: Constructs {
+ block_quote: false,
+ ..Constructs::default()
+ },
+ ..Options::default()
+ }
+ ),
+ "<p>&gt; # a\n&gt; b\n&gt; c</p>",
+ "should support turning off block quotes"
+ );
}