From b7bd2b734fae09c40d738fcd57d5ee6876f0f504 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 11 Jul 2022 14:53:45 +0200 Subject: Fix block quote bugs --- tests/block_quote.rs | 11 +++++------ tests/code_fenced.rs | 11 +++++------ tests/code_indented.rs | 39 ++++++++++++++++++--------------------- 3 files changed, 28 insertions(+), 33 deletions(-) (limited to 'tests') diff --git a/tests/block_quote.rs b/tests/block_quote.rs index 5e5adce..c0b10b7 100644 --- a/tests/block_quote.rs +++ b/tests/block_quote.rs @@ -67,12 +67,11 @@ fn block_quote() { // "should not support lazy lists in block quotes" // ); - // To do: block quote (lazy, code (indented), some bug). - // assert_eq!( - // micromark("> a\n b"), - // "
\n
a\n
\n
\n
b\n
", - // "should not support lazy indented code in block quotes" - // ); + assert_eq!( + micromark("> a\n b"), + "
\n
a\n
\n
\n
b\n
", + "should not support lazy indented code in block quotes" + ); assert_eq!( micromark("> ```\na\n```"), diff --git a/tests/code_fenced.rs b/tests/code_fenced.rs index a777f9f..fa9ed5f 100644 --- a/tests/code_fenced.rs +++ b/tests/code_fenced.rs @@ -226,12 +226,11 @@ fn code_fenced() { "should not support a closing sequence w/ too much indent, regardless of opening sequence (1)" ); - // To do: blockquote (fix compiler). - // assert_eq!( - // micromark("> ```\n>\n>\n>\n\na"), - // "
\n
\n\n\n
\n
\n

a

", - // "should not support a closing sequence w/ too much indent, regardless of opening sequence (2)" - // ); + assert_eq!( + micromark("> ```\n>\n>\n>\n\na"), + "
\n
\n\n\n
\n
\n

a

", + "should not support a closing sequence w/ too much indent, regardless of opening sequence (2)" + ); assert_eq!( micromark("> ```a\nb"), diff --git a/tests/code_indented.rs b/tests/code_indented.rs index f06cf4c..f462792 100644 --- a/tests/code_indented.rs +++ b/tests/code_indented.rs @@ -82,47 +82,44 @@ fn code_indented() { "should not support lazyness (1)" ); - // To do: blockquote (lazy, some bug). + // To do: blockquote (lazy). // assert_eq!( // micromark("> a\n b"), // "
\n

a\nb

\n
", // "should not support lazyness (2)" // ); - // To do: blockquote (lazy, some bug). + // To do: blockquote (lazy). // assert_eq!( // micromark("> a\n b"), // "
\n

a\nb

\n
", // "should not support lazyness (3)" // ); - // To do: blockquote (lazy, some bug). + // To do: blockquote (lazy). // assert_eq!( // micromark("> a\n b"), // "
\n

a\nb

\n
", // "should not support lazyness (4)" // ); - // To do: blockquote (lazy, some bug). - // assert_eq!( - // micromark("> a\n b"), - // "
\n
a\n
\n
\n
b\n
", - // "should not support lazyness (5)" - // ); + assert_eq!( + micromark("> a\n b"), + "
\n
a\n
\n
\n
b\n
", + "should not support lazyness (5)" + ); - // To do: blockquote (lazy, some bug). - // assert_eq!( - // micromark("> a\n b"), - // "
\n
a\n
\n
\n
 b\n
", - // "should not support lazyness (6)" - // ); + assert_eq!( + micromark("> a\n b"), + "
\n
a\n
\n
\n
 b\n
", + "should not support lazyness (6)" + ); - // To do: blockquote (lazy, some bug). - // assert_eq!( - // micromark("> a\n b"), - // "
\n
a\n
\n
\n
  b\n
", - // "should not support lazyness (7)" - // ); + assert_eq!( + micromark("> a\n b"), + "
\n
a\n
\n
\n
  b\n
", + "should not support lazyness (7)" + ); // To do: turning things off. // assert_eq!( -- cgit