Skip to content

Commit c0cd392

Browse files
committed
Test to confirm tags following content on one line are not recognized
1 parent 4887c9e commit c0cd392

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_syntax/extensions/test_md_in_html.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,18 @@ def test_md1_oneliner_block_complex_start_tail(self):
13561356
extensions=['md_in_html']
13571357
)
13581358

1359+
def test_md1_oneliner_block_complex_fail(self):
1360+
# https://github.com/Python-Markdown/markdown/issues/1074
1361+
# Nested will fail because an inline tag is only considered at the beginning if it is not preceded by text.
1362+
self.assertMarkdownRenders(
1363+
'<div class="a" markdown>**strong**<div class="b" markdown>**strong**</div></div>',
1364+
'<div class="a">\n'
1365+
'<p><strong>strong</strong><div class="b" markdown><strong>strong</strong></p>\n'
1366+
'</div>\n'
1367+
'</div>',
1368+
extensions=['md_in_html']
1369+
)
1370+
13591371
def test_md1_oneliner_block_start(self):
13601372
# https://github.com/Python-Markdown/markdown/issues/1074
13611373
self.assertMarkdownRenders(

0 commit comments

Comments
 (0)