Skip to content

Commit

Permalink
Coverage high
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Aug 14, 2014
1 parent b7b611f commit 2e6f740
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test.py
Expand Up @@ -92,6 +92,9 @@ def test_use_xhtml():
ret = mistune.markdown('foo\n\n----\n\nbar', use_xhtml=True)
assert '<hr />' in ret

ret = mistune.markdown('foo \nbar', use_xhtml=True)
assert '<br />' in ret

ret = mistune.markdown('![foo](bar "title")', use_xhtml=True)
assert '<img src="bar" alt="foo" title="title" />' in ret

Expand All @@ -101,6 +104,16 @@ def test_skip_html():
assert ret == '<p>foo bar</p>\n'


def test_trigger_more_cases():
markdown = mistune.Markdown(
inline=mistune.InlineLexer,
block=mistune.BlockLexer,
skip_html=True
)
ret = markdown.render('foo[^foo]\n\n[^foo]: foo\n\n[^foo]: bar\n')
assert 'bar' not in ret


def test_custom_lexer():
import copy

Expand Down

0 comments on commit 2e6f740

Please sign in to comment.