Skip to content

Commit

Permalink
Test to confirm tags following content on one line are not recognized
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Jan 28, 2025
1 parent 4887c9e commit c0cd392
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_syntax/extensions/test_md_in_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,18 @@ def test_md1_oneliner_block_complex_start_tail(self):
extensions=['md_in_html']
)

def test_md1_oneliner_block_complex_fail(self):
# https://github.com/Python-Markdown/markdown/issues/1074
# Nested will fail because an inline tag is only considered at the beginning if it is not preceded by text.
self.assertMarkdownRenders(
'<div class="a" markdown>**strong**<div class="b" markdown>**strong**</div></div>',
'<div class="a">\n'
'<p><strong>strong</strong><div class="b" markdown><strong>strong</strong></p>\n'
'</div>\n'
'</div>',
extensions=['md_in_html']
)

def test_md1_oneliner_block_start(self):
# https://github.com/Python-Markdown/markdown/issues/1074
self.assertMarkdownRenders(
Expand Down

0 comments on commit c0cd392

Please sign in to comment.