Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21c0d034d0 | ||
|
|
f59f9f9a54 | ||
|
|
bd22a16c9e | ||
|
|
55fb96e3c0 | ||
|
|
5f102d5223 |
@@ -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)
|
||||
|
||||
2
setup.py
2
setup.py
@@ -10,7 +10,7 @@ read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read()
|
||||
pkgmeta = {
|
||||
'__title__': 'markdownify',
|
||||
'__author__': 'Matthew Tretter',
|
||||
'__version__': '0.7.0',
|
||||
'__version__': '0.7.1',
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -229,7 +229,9 @@ def test_hn_nested_img():
|
||||
|
||||
|
||||
def test_hr():
|
||||
assert md('<hr>hr</hr>') == 'hr'
|
||||
assert md('Hello<hr>World') == 'Hello\n\n---\n\nWorld'
|
||||
assert md('Hello<hr />World') == 'Hello\n\n---\n\nWorld'
|
||||
assert md('<p>Hello</p>\n<hr>\n<p>World</p>') == 'Hello\n\n\n\n\n---\n\n\nWorld\n\n'
|
||||
|
||||
|
||||
def test_head():
|
||||
|
||||
Reference in New Issue
Block a user