extern crate micromark; use micromark::micromark; #[test] fn thematic_break() { assert_eq!( micromark("***\n---\n___"), "
+++
", "should not support thematic breaks w/ plusses" ); assert_eq!( micromark("==="), "===
", "should not support thematic breaks w/ equals" ); assert_eq!( micromark("--"), "--
", "should not support thematic breaks w/ two dashes" ); assert_eq!( micromark("**"), "**
", "should not support thematic breaks w/ two asterisks" ); assert_eq!( micromark("__"), "__
", "should not support thematic breaks w/ two underscores" ); assert_eq!( micromark(" ***"), "***\n
",
"should not support thematic breaks w/ 4 spaces"
);
// To do: paragraphs.
// assert_eq!(
// micromark("Foo\n ***"),
// "Foo\n***
", // "should not support thematic breaks w/ 4 spaces as paragraph continuation" // ); assert_eq!( micromark("_____________________________________"), "_ _ _ _ a
", "should not support thematic breaks w/ other characters (1)" ); assert_eq!( micromark("a------"), "a------
", "should not support thematic breaks w/ other characters (2)" ); assert_eq!( micromark("---a---"), "---a---
", "should not support thematic breaks w/ other characters (3)" ); // To do: phrasing. // assert_eq!( // micromark(" *-*"), // "-
", // "should not support thematic breaks w/ mixed markers" // ); // To do: lists. // assert_eq!( // micromark("- foo\n***\n- bar"), // "Foo
\nbar
", // "should support thematic breaks interrupting paragraphs" // ); // To do: setext. // assert_eq!( // micromark("Foo\n---\nbar"), // "bar
", // "should not support thematic breaks w/ dashes interrupting paragraphs (setext heading)" // ); // To do: list. // assert_eq!( // micromark("- Foo\n- * * *"), // "\n\n
\n
a
", // "should not support lazyness (1)" // ); // assert_eq!( // micromark("> a\n---"), // "\n\na
\n
***
", // "should support turning off thematic breaks" // ); }