diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-12 17:53:05 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-12 17:53:05 +0200 |
commit | 879fbf500d0aef45cf5811569a53510013440bcd (patch) | |
tree | 0e8c0183fa8b6b0060bef780eabc773ab30ee870 /tests/thematic_break.rs | |
parent | 2e3b7abaa9877b658fa4f8f2612acc617dff60bb (diff) | |
download | markdown-rs-879fbf500d0aef45cf5811569a53510013440bcd.tar.gz markdown-rs-879fbf500d0aef45cf5811569a53510013440bcd.tar.bz2 markdown-rs-879fbf500d0aef45cf5811569a53510013440bcd.zip |
Fix to prefer thematic breaks over lists
Diffstat (limited to '')
-rw-r--r-- | tests/thematic_break.rs | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/tests/thematic_break.rs b/tests/thematic_break.rs index 02be90f..0cedada 100644 --- a/tests/thematic_break.rs +++ b/tests/thematic_break.rs @@ -75,12 +75,11 @@ fn thematic_break() { "should support thematic breaks w/ many markers" ); - // To do: list (should prefer thematic break). - // assert_eq!( - // micromark(" - - -"), - // "<hr />", - // "should support thematic breaks w/ spaces (1)" - // ); + assert_eq!( + micromark(" - - -"), + "<hr />", + "should support thematic breaks w/ spaces (1)" + ); assert_eq!( micromark(" ** * ** * ** * **"), @@ -88,19 +87,17 @@ fn thematic_break() { "should support thematic breaks w/ spaces (2)" ); - // To do: list (prefer thematic break). - // assert_eq!( - // micromark("- - - -"), - // "<hr />", - // "should support thematic breaks w/ spaces (3)" - // ); + assert_eq!( + micromark("- - - -"), + "<hr />", + "should support thematic breaks w/ spaces (3)" + ); - // To do: list (prefer thematic break). - // assert_eq!( - // micromark("- - - - "), - // "<hr />", - // "should support thematic breaks w/ trailing spaces" - // ); + assert_eq!( + micromark("- - - - "), + "<hr />", + "should support thematic breaks w/ trailing spaces" + ); assert_eq!( micromark("_ _ _ _ a"), @@ -132,12 +129,11 @@ fn thematic_break() { "should support thematic breaks mixed w/ lists (1)" ); - // To do: list (prefer thematic break). - // assert_eq!( - // micromark("* Foo\n* * *\n* Bar"), - // "<ul>\n<li>Foo</li>\n</ul>\n<hr />\n<ul>\n<li>Bar</li>\n</ul>", - // "should support thematic breaks mixed w/ lists (2)" - // ); + assert_eq!( + micromark("* Foo\n* * *\n* Bar"), + "<ul>\n<li>Foo</li>\n</ul>\n<hr />\n<ul>\n<li>Bar</li>\n</ul>", + "should support thematic breaks mixed w/ lists (2)" + ); assert_eq!( micromark("Foo\n***\nbar"), @@ -151,12 +147,11 @@ fn thematic_break() { "should not support thematic breaks w/ dashes interrupting paragraphs (setext heading)" ); - // To do: list (prefer thematic break). - // assert_eq!( - // micromark("- Foo\n- * * *"), - // "<ul>\n<li>Foo</li>\n<li>\n<hr />\n</li>\n</ul>", - // "should support thematic breaks in lists" - // ); + assert_eq!( + micromark("- Foo\n- * * *"), + "<ul>\n<li>Foo</li>\n<li>\n<hr />\n</li>\n</ul>", + "should support thematic breaks in lists" + ); assert_eq!( micromark("> ---\na"), |