aboutsummaryrefslogtreecommitdiffstats
path: root/tests/misc_tabs.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/misc_tabs.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/misc_tabs.rs')
-rw-r--r--tests/misc_tabs.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/misc_tabs.rs b/tests/misc_tabs.rs
index e82738d..7073c57 100644
--- a/tests/misc_tabs.rs
+++ b/tests/misc_tabs.rs
@@ -1,14 +1,13 @@
extern crate micromark;
use micromark::{micromark, micromark_with_options, Options};
-const DANGER: &Options = &Options {
- allow_dangerous_html: true,
- allow_dangerous_protocol: true,
- default_line_ending: None,
-};
-
#[test]
fn tabs_flow() {
+ let danger = &Options {
+ allow_dangerous_html: true,
+ ..Options::default()
+ };
+
assert_eq!(
micromark(" x"),
"<pre><code>x\n</code></pre>",
@@ -118,7 +117,7 @@ fn tabs_flow() {
);
assert_eq!(
- micromark_with_options("<x\ty\tz\t=\t\"\tx\t\">", DANGER),
+ micromark_with_options("<x\ty\tz\t=\t\"\tx\t\">", danger),
"<x\ty\tz\t=\t\"\tx\t\">",
"should support tabs in HTML (if whitespace is allowed)"
);