diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 2cd8fc8..8ca1904 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -5,7 +5,7 @@ import six convert_heading_re = re.compile(r'convert_h(\d+)') line_beginning_re = re.compile(r'^', re.MULTILINE) -whitespace_re = re.compile(r'[\r\n\s\t ]+') +whitespace_re = re.compile(r'[\t ]+') html_heading_re = re.compile(r'h[1-6]') diff --git a/tests/test_basic.py b/tests/test_basic.py index 78775b6..bf25ee0 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -10,4 +10,4 @@ def test_soup(): def test_whitespace(): - assert md(' a b \n\n c ') == ' a b c ' + assert md(' a b \t\t c ') == ' a b c ' diff --git a/tests/test_conversions.py b/tests/test_conversions.py index f5fc1c2..657c016 100644 --- a/tests/test_conversions.py +++ b/tests/test_conversions.py @@ -106,6 +106,10 @@ def test_hn(): assert md('
P
C ', heading_style=ATX_CLOSED) == '# A P C #\n\n'