diff --git a/markdown.py b/markdown.py
index 90eb71ebd..310be655e 100644
--- a/markdown.py
+++ b/markdown.py
@@ -389,4 +389,8 @@ def markdown_to_html(markdown: str) -> str:
html_str = html_str.replace('
', '')
html_str = html_str.replace('
', '
')
+ html_str = html_str.replace('
',
+ '')
+ html_str = html_str.replace('
', '')
+
return html_str
diff --git a/tests.py b/tests.py
index 5f987d6a2..e6ed196a1 100644
--- a/tests.py
+++ b/tests.py
@@ -5737,8 +5737,8 @@ def _test_markdown_to_html():
result = markdown_to_html(markdown)
expected = \
'This is a list of points:
\n' + \
- '
\n- Point 1
\n' + \
- '- Point 2
\n
\n
\n' + \
+ '\n- Point 1
\n' + \
+ '- Point 2
\n\n
\n' + \
'And some other text.
\n'
if result != expected:
print(result)
@@ -5750,9 +5750,9 @@ def _test_markdown_to_html():
'And some other text.'
result = markdown_to_html(markdown)
expected = \
- 'This is a list of points:
\n
\n' + \
- '- Point 1
\n' + \
- '- Point 2
\n
\n
\n' + \
+ 'This is a list of points:
\n\n' + \
+ '- Point 1
\n' + \
+ '- Point 2
\n\n
\n' + \
'And some other text.
\n'
if result != expected:
print(result)