diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 3d67a49..4d36bd6 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -314,7 +314,7 @@ class MarkdownConverter(object): el = el.parent bullets = self.options['bullets'] bullet = bullets[depth % len(bullets)] - return '%s %s\n' % (bullet, text or '') + return '%s %s\n' % (bullet, (text or '').strip()) def convert_p(self, el, text, convert_as_inline): if convert_as_inline: diff --git a/setup.py b/setup.py index 467c1fa..6f5d2a3 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read() pkgmeta = { '__title__': 'markdownify', '__author__': 'Matthew Tretter', - '__version__': '0.9.3', + '__version__': '0.9.4', } diff --git a/tests/test_lists.py b/tests/test_lists.py index 08c82c7..5a04430 100644 --- a/tests/test_lists.py +++ b/tests/test_lists.py @@ -51,6 +51,14 @@ def test_nested_ols(): def test_ul(): assert md('') == '* a\n* b\n' + assert md("""""") == '* a\n* b\n* c\n' def test_inline_ul():