diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 0b2a620..eeaaf74 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -269,6 +269,9 @@ class MarkdownConverter(object): continue return '\n'.join(text_data) + def convert_hr(self, el, text, convert_as_inline): + return '\n\n---\n\n' + def markdownify(html, **options): return MarkdownConverter(**options).convert(html) diff --git a/tests/test_conversions.py b/tests/test_conversions.py index 6dcf9a6..fcb9bf3 100644 --- a/tests/test_conversions.py +++ b/tests/test_conversions.py @@ -307,3 +307,7 @@ def test_strong_em_symbol(): def test_newline_style(): assert md('a
b
c', newline_style=BACKSLASH) == 'a\\\nb\\\nc' + + +def test_hr(): + assert md('Hello
World') == 'Hello\n\n---\n\nWorld'