From fb185e801e7d2002948d0b4e91ee06767e13ed00 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 13 Jul 2022 11:26:22 +0200 Subject: Fix lists in lists and some other bugs --- tests/list.rs | 80 +++++++++++++++++++++++++++-------------------------------- 1 file changed, 37 insertions(+), 43 deletions(-) (limited to 'tests') diff --git a/tests/list.rs b/tests/list.rs index 1eee72a..fd511db 100644 --- a/tests/list.rs +++ b/tests/list.rs @@ -416,7 +416,7 @@ fn list() { // "should not support lists in lists w/ too few spaces (3)" // ); - // To do: list (seen as seeveral lists?). + // To do: list (seen as several lists?). // assert_eq!( // micromark("1. a\n\n 2. b\n\n 3. c"), // "
    \n
  1. \n

    a

    \n
  2. \n
  3. \n

    b

    \n
  4. \n
\n
3. c\n
", @@ -429,12 +429,11 @@ fn list() { "should support loose lists w/ a blank line between (1)" ); - // To do: list (multiple blank lines). - // assert_eq!( - // micromark("* a\n*\n\n* c"), - // "", - // "should support loose lists w/ a blank line between (2)" - // ); + assert_eq!( + micromark("* a\n*\n\n* c"), + "", + "should support loose lists w/ a blank line between (2)" + ); // To do: list (indent). // assert_eq!( @@ -513,12 +512,11 @@ fn list() { // ); // Extra. - // To do: list (empty). - // assert_eq!( - // micromark("* a\n*\n\n \n\t\n* b"), - // "", - // "should support continued list items after an empty list item w/ many blank lines" - // ); + assert_eq!( + micromark("* a\n*\n\n \n\t\n* b"), + "", + "should support continued list items after an empty list item w/ many blank lines" + ); // To do: list (indent). // assert_eq!( @@ -535,75 +533,71 @@ fn list() { "should ignore line endings after tight items ending in tags" ); - // To do: list (empty). - // assert_eq!( - // micromark("* foo\n\n*\n\n* bar"), - // "", - // "should support empty items in a spread list" - // ); + assert_eq!( + micromark("* foo\n\n*\n\n* bar"), + "", + "should support empty items in a spread list" + ); - // To do: list (slurp?). + // To do: list (indent). // assert_eq!( // micromark("- ```\n\n ```"), // "", // "should remove indent of code (fenced) in list (0 space)" // ); - // To do: list (slurp?). + // To do: list (indent, slurp?). // assert_eq!( // micromark("- ```\n \n ```"), // "", // "should remove indent of code (fenced) in list (1 space)" // ); - // To do: list (slurp?). + // To do: list (indent, slurp?). // assert_eq!( // micromark("- ```\n \n ```"), // "", // "should remove indent of code (fenced) in list (2 spaces)" // ); - // To do: list (slurp?). + // To do: list (indent, slurp?). // assert_eq!( // micromark("- ```\n \n ```"), // "", // "should remove indent of code (fenced) in list (3 spaces)" // ); - // To do: list (slurp?). + // To do: list (indent, slurp?). // assert_eq!( // micromark("- ```\n \n ```"), // "", // "should remove indent of code (fenced) in list (4 spaces)" // ); - // To do: list (slurp?). + // To do: list (indent, slurp?). // assert_eq!( // micromark("- ```\n\t\n ```"), // "", // "should remove indent of code (fenced) in list (1 tab)" // ); - // To do: list (empty). - // assert_eq!( - // micromark("- +\n-"), - // "", - // "should support complex nested and empty lists (1)" - // ); + assert_eq!( + micromark("- +\n-"), + "", + "should support complex nested and empty lists (1)" + ); - // To do: list (empty). - // assert_eq!( - // micromark("- 1.\n-"), - // "", - // "should support complex nested and empty lists (2)" - // ); + assert_eq!( + micromark("- 1.\n-"), + "", + "should support complex nested and empty lists (2)" + ); - // To do: list (empty). - // assert_eq!( - // micromark("* - +\n* -"), - // "", - // "should support complex nested and empty lists (3)" - // ); + assert_eq!( + micromark("* - +\n* -"), + "", + "should support complex nested and empty lists (3)" + ); assert_eq!( micromark_with_options("* a\n\n\n\n* b", DANGER), -- cgit