This markdown:
should have the same output as this:
but it doesn't.
The output of the first snippet is (as expected)
<ul>
<li>one</li>
<li>two</li>
</ul>
<p>Next line</p>
but the output of the second snippet is
<ul>
<li>
<p>one</p>
</li>
<li>
<p>two</p>
</li>
</ul>
<p>Next line</p>
which is not expected. The <p> tags should probably not be there.
Here's a failing test
#[test]
fn two_blank_lines_inserts_paragraphs() {
let out = to_html("- one\n- two\nNext line");
assert!(!out.contains("<p>one</p>")); // Passes
let out = to_html("- one\n- two\n\nNext line");
assert!(!out.contains("<p>one</p>")); // Passes
let out = to_html("- one\n- two\n\n\nNext line");
assert!(!out.contains("<p>one</p>")); // Fails 💥
}
This markdown:
should have the same output as this:
but it doesn't.
The output of the first snippet is (as expected)
but the output of the second snippet is
which is not expected. The
<p>tags should probably not be there.Here's a failing test