From 10355a403f57c93a074716c785d588c76de5634c Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 9 Jun 2022 13:01:36 +0200 Subject: Add support for indented lines in paragraphs --- tests/code_indented.rs | 13 ++++----- tests/heading_atx.rs | 2 +- tests/html_flow.rs | 74 ++++++++++++++++++++++++------------------------- tests/thematic_break.rs | 2 +- 4 files changed, 44 insertions(+), 47 deletions(-) (limited to 'tests') diff --git a/tests/code_indented.rs b/tests/code_indented.rs index f5926c0..80dae4b 100644 --- a/tests/code_indented.rs +++ b/tests/code_indented.rs @@ -40,19 +40,18 @@ fn code_indented() { "should support blank lines in indented code (3)" ); - // To do: paragraphs. + // To do: strip whitespace. // assert_eq!( // micromark("Foo\n bar"), // "

Foo\nbar

", // "should not support interrupting paragraphs" // ); - // To do: paragraphs. - // assert_eq!( - // micromark(" foo\nbar"), - // "
foo\n
\n

bar

", - // "should support paragraphs directly after indented code" - // ); + assert_eq!( + micromark(" foo\nbar"), + "
foo\n
\n

bar

", + "should support paragraphs directly after indented code" + ); // To do: setext. // assert_eq!( diff --git a/tests/heading_atx.rs b/tests/heading_atx.rs index b75d058..7a830fe 100644 --- a/tests/heading_atx.rs +++ b/tests/heading_atx.rs @@ -99,7 +99,7 @@ fn heading_atx() { "should not support four initial spaces" ); - // To do: lazy. + // To do: strip whitespace. // assert_eq!( // micromark("foo\n # bar"), // "

foo\n# bar

", diff --git a/tests/html_flow.rs b/tests/html_flow.rs index 51d1a2a..18eff2d 100644 --- a/tests/html_flow.rs +++ b/tests/html_flow.rs @@ -115,12 +115,11 @@ p {color:blue;} "should support an eof directly after a raw tag name" ); - // To do: paragraphs. - // assert_eq!( - // micromark_with_options("</script\nmore

", - // "should not support a raw closing tag" - // ); + assert_eq!( + micromark_with_options("</script\nmore

", + "should not support a raw closing tag" + ); assert_eq!( micromark_with_options("