Fix missing whitespaces in <li> node

This commit is contained in:
Jiulong Wang
2021-05-10 14:42:05 -07:00
parent 0fee4b0a80
commit 91a64e3cd4
2 changed files with 8 additions and 1 deletions

View File

@@ -308,6 +308,10 @@ def test_bullets():
assert md(nested_uls, bullets='-') == '\n- 1\n\t- a\n\t\t- I\n\t\t- II\n\t\t- III\n\t- b\n\t- c\n- 2\n- 3\n'
def test_li_text():
assert md('<ul><li>foo <a href="#">bar</a></li><li>foo bar </li></ul>') == '* foo [bar](#)\n* foo bar\n'
def test_img():
assert md('<img src="/path/to/img.jpg" alt="Alt text" title="Optional title" />') == '![Alt text](/path/to/img.jpg "Optional title")'
assert md('<img src="/path/to/img.jpg" alt="Alt text" />') == '![Alt text](/path/to/img.jpg)'