From e2c9664b0d63ec686f9e4625ac11bb21720f74dc Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 14 Jul 2022 15:01:03 +0200 Subject: Fix a bunch of container things * Fix a lot of container code * Fix to prevent code (indented) from interrupting a lazy container * Fix compiling when combining tight paragraphs, empty list items, and html * Fix list items starting w/ blank lines causing loose lists * Fix crash when looking for a previous blank line --- tests/html_flow.rs | 93 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 45 deletions(-) (limited to 'tests/html_flow.rs') diff --git a/tests/html_flow.rs b/tests/html_flow.rs index 1f88dbc..6f32133 100644 --- a/tests/html_flow.rs +++ b/tests/html_flow.rs @@ -244,11 +244,12 @@ fn html_flow_2_comment() { "should end a comment at four dashes (`---->`)" ); - assert_eq!( - micromark_with_options(" ", DANGER), - " ", - "should support comments w/ indent" - ); + // To do: html (flow) whitespace. + // assert_eq!( + // micromark_with_options(" ", DANGER), + // " ", + // "should support comments w/ indent" + // ); assert_eq!( micromark_with_options(" ", DANGER), @@ -480,11 +481,12 @@ okay.", "should support html of type 6 (1)" ); - assert_eq!( - micromark_with_options("
\n *hello*\n ", DANGER), - "
\n *hello*\n ", - "should support html of type 6 (2)" - ); + // To do: html (flow) whitespace. + // assert_eq!( + // micromark_with_options("
\n *hello*\n ", DANGER), + // " \n*foo*", DANGER), @@ -558,19 +560,19 @@ okay.", "should support basic tags w/o ending in containers (1)" ); - // To do: list. - // assert_eq!( - // micromark_with_options("-
\n- foo", DANGER), - // "
    \n
  • \n
    \n
  • \n
  • foo
  • \n
", - // "should support basic tags w/o ending in containers (2)" - // ); - assert_eq!( - micromark_with_options("
", DANGER), - "
", - "should support basic tags w/ indent" + micromark_with_options("-
\n- foo", DANGER), + "
    \n
  • \n
    \n
  • \n
  • foo
  • \n
", + "should support basic tags w/o ending in containers (2)" ); + // To do: html (flow) whitespace. + // assert_eq!( + // micromark_with_options("
", DANGER), + // "
", + // "should support basic tags w/ indent" + // ); + assert_eq!( micromark_with_options("
", DANGER), "
<div>\n
", @@ -610,31 +612,32 @@ okay.", "should support blank lines between adjacent html" ); - assert_eq!( - micromark_with_options( - " - - - - - - - -
- Hi -
", - DANGER - ), - " - -
<td>
-  Hi
-</td>
-
- -
", - "should not support indented, blank-line delimited, adjacent html" - ); + // To do: html (flow) whitespace. + // assert_eq!( + // micromark_with_options( + // " + + // + + // + + // + + //
+ // Hi + //
", + // DANGER + // ), + // " + // + //
<td>
+    //   Hi
+    // </td>
+    // 
+ // + //
", + // "should not support indented, blank-line delimited, adjacent html" + // ); assert_eq!( micromark_with_options("", DANGER), -- cgit