diff --git a/tests/test_conversions.py b/tests/test_conversions.py index 46a44ce..8a2ed46 100644 --- a/tests/test_conversions.py +++ b/tests/test_conversions.py @@ -1,4 +1,25 @@ from markdownify import markdownify as md, ATX, ATX_CLOSED +import re + + +nested_uls = re.sub('\s+', '', """ + """) def test_a(): @@ -84,6 +105,14 @@ def test_ul(): assert md('') == '* a\n* b\n' +def test_nested_uls(): + """ + Nested ULs should alternate bullet characters. + + """ + assert md(nested_uls) == '* 1\n\t+ a\n\t\t- I\n\t\t- II\n\t\t- III\n\t\t\n\t+ b\n\t+ c\n\t\n* 2\n* 3\n' + + def test_img(): assert md('Alt text') == '![Alt text](/path/to/img.jpg "Optional title")' assert md('Alt text') == '![Alt text](/path/to/img.jpg)'