diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 12be28e..25608bf 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -153,7 +153,7 @@ class MarkdownConverter(object): el = el.parent if nested: text = '\n' + self.indent(text, 1) - return text + return '\n' + text + '\n' convert_ul = convert_list convert_ol = convert_list diff --git a/tests/test_conversions.py b/tests/test_conversions.py index af4b54f..dfc8d3c 100644 --- a/tests/test_conversions.py +++ b/tests/test_conversions.py @@ -103,6 +103,9 @@ def test_strong(): def test_ul(): assert md('') == '* a\n* b\n' + +def test_inline_ul(): + assert md('

foo

bar

') == 'foo \n* a\n* b\n\nbar' def test_nested_uls():