Test ATX and ATX_CLOSED style headings

This commit is contained in:
Matthew Tretter
2013-07-31 22:19:41 -04:00
parent 891a4a8d08
commit 1cd8e56c47

View File

@@ -1,4 +1,4 @@
from markdownify import markdownify as md
from markdownify import markdownify as md, ATX, ATX_CLOSED
def test_a():
@@ -54,6 +54,16 @@ def test_hn():
assert md('<h6>Hello</h6>') == '###### Hello\n\n'
def test_atx_headings():
assert md('<h1>Hello</h1>', heading_style=ATX) == '# Hello\n\n'
assert md('<h2>Hello</h2>', heading_style=ATX) == '## Hello\n\n'
def test_atx_closed_headings():
assert md('<h1>Hello</h1>', heading_style=ATX_CLOSED) == '# Hello #\n\n'
assert md('<h2>Hello</h2>', heading_style=ATX_CLOSED) == '## Hello ##\n\n'
def test_i():
assert md('<i>Hello</i>') == '*Hello*'