diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 69ec328..ac34ee5 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -443,7 +443,7 @@ def _indent_for_blockquote(match): def convert_br(self, el, text, parent_tags): if '_inline' in parent_tags: - return "" + return ' ' if self.options['newline_style'].lower() == BACKSLASH: return '\\\n' diff --git a/tests/test_conversions.py b/tests/test_conversions.py index 6939329..0df8f57 100644 --- a/tests/test_conversions.py +++ b/tests/test_conversions.py @@ -79,6 +79,8 @@ def test_blockquote_nested(): def test_br(): assert md('a
b
c') == 'a \nb \nc' assert md('a
b
c', newline_style=BACKSLASH) == 'a\\\nb\\\nc' + assert md('

foo
bar

', heading_style=ATX) == '\n\n# foo bar\n\n' + assert md('foo
bar', heading_style=ATX) == ' foo bar |' def test_code():