Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lepture/mistune
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Dec 4, 2017
2 parents b8da37e + e90cf3d commit 787c34e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mistune.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ class InlineLexer(object):
'linebreak', 'strikethrough', 'text',
]
inline_html_rules = [
'escape', 'autolink', 'url', 'link', 'reflink',
'escape', 'inline_html', 'autolink', 'url', 'link', 'reflink',
'nolink', 'double_emphasis', 'emphasis', 'code',
'linebreak', 'strikethrough', 'text',
]
Expand Down
15 changes: 15 additions & 0 deletions tests/test_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,21 @@ def test_parse_block_html():
assert '<strong>' not in ret


def test_parse_nested_html():
ret = mistune.markdown(
'<div><a href="http://example.org">**foo**</a></div>',
parse_block_html=True, escape=False
)
assert '<div><a href="http://example.org">' in ret
assert '<strong>' not in ret

ret = mistune.markdown(
'<div><a href="http://example.org">**foo**</a></div>',
parse_block_html=True, parse_inline_html=True, escape=False
)
assert '<div><a href="http://example.org"><strong>' in ret


def test_trigger_more_cases():
markdown = mistune.Markdown(
inline=mistune.InlineLexer,
Expand Down

0 comments on commit 787c34e

Please sign in to comment.