aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hard_break_trailing.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/hard_break_trailing.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/hard_break_trailing.rs')
-rw-r--r--tests/hard_break_trailing.rs22
1 files changed, 15 insertions, 7 deletions
diff --git a/tests/hard_break_trailing.rs b/tests/hard_break_trailing.rs
index d67ad37..2013c46 100644
--- a/tests/hard_break_trailing.rs
+++ b/tests/hard_break_trailing.rs
@@ -1,5 +1,5 @@
extern crate micromark;
-use micromark::micromark;
+use micromark::{micromark, micromark_with_options, Constructs, Options};
#[test]
fn hard_break_trailing() {
@@ -111,10 +111,18 @@ fn hard_break_trailing() {
"should support a mixed line suffix after a span (3)"
);
- // // To do: turning things off.
- // assert_eq!(
- // micromark("a \nb", {extensions: [{disable: {null: ["hardBreakTrailing"]}}]}),
- // "<p>a\nb</p>",
- // "should support turning off hard break (trailing)"
- // );
+ assert_eq!(
+ micromark_with_options(
+ "a \nb",
+ &Options {
+ constructs: Constructs {
+ hard_break_trailing: false,
+ ..Constructs::default()
+ },
+ ..Options::default()
+ }
+ ),
+ "<p>a\nb</p>",
+ "should support turning off hard break (trailing)"
+ );
}