optimize empty-line handling for li and blockquote content
Signed-off-by: chrispy <chrispy@synopsys.com>
This commit is contained in:
@@ -62,7 +62,7 @@ def test_blockquote():
|
||||
|
||||
def test_blockquote_with_nested_paragraph():
|
||||
assert md('<blockquote><p>Hello</p></blockquote>') == '\n> Hello\n\n'
|
||||
assert md('<blockquote><p>Hello</p><p>Hello again</p></blockquote>') == '\n> Hello\n> \n> Hello again\n\n'
|
||||
assert md('<blockquote><p>Hello</p><p>Hello again</p></blockquote>') == '\n> Hello\n>\n> Hello again\n\n'
|
||||
|
||||
|
||||
def test_blockquote_with_paragraph():
|
||||
|
||||
@@ -47,7 +47,7 @@ def test_ol():
|
||||
assert md('<ol start="-1"><li>a</li><li>b</li></ol>') == '\n\n1. a\n2. b\n'
|
||||
assert md('<ol start="foo"><li>a</li><li>b</li></ol>') == '\n\n1. a\n2. b\n'
|
||||
assert md('<ol start="1.5"><li>a</li><li>b</li></ol>') == '\n\n1. a\n2. b\n'
|
||||
assert md('<ol start="1234"><li><p>first para</p><p>second para</p></li><li><p>third para</p><p>fourth para</p></li></ol>') == '\n\n1234. first para\n \n second para\n1235. third para\n \n fourth para\n'
|
||||
assert md('<ol start="1234"><li><p>first para</p><p>second para</p></li><li><p>third para</p><p>fourth para</p></li></ol>') == '\n\n1234. first para\n\n second para\n1235. third para\n\n fourth para\n'
|
||||
|
||||
|
||||
def test_nested_ols():
|
||||
@@ -64,7 +64,7 @@ def test_ul():
|
||||
<li> c
|
||||
</li>
|
||||
</ul>""") == '\n\n* a\n* b\n* c\n'
|
||||
assert md('<ul><li><p>first para</p><p>second para</p></li><li><p>third para</p><p>fourth para</p></li></ul>') == '\n\n* first para\n \n second para\n* third para\n \n fourth para\n'
|
||||
assert md('<ul><li><p>first para</p><p>second para</p></li><li><p>third para</p><p>fourth para</p></li></ul>') == '\n\n* first para\n\n second para\n* third para\n\n fourth para\n'
|
||||
|
||||
|
||||
def test_inline_ul():
|
||||
|
||||
Reference in New Issue
Block a user