From c0cd3924b68e189b501e9d51b706de073a8aedd1 Mon Sep 17 00:00:00 2001 From: facelessuser Date: Tue, 28 Jan 2025 07:23:12 -0700 Subject: [PATCH] Test to confirm tags following content on one line are not recognized --- tests/test_syntax/extensions/test_md_in_html.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_syntax/extensions/test_md_in_html.py b/tests/test_syntax/extensions/test_md_in_html.py index 400e2f9f..1bdca393 100644 --- a/tests/test_syntax/extensions/test_md_in_html.py +++ b/tests/test_syntax/extensions/test_md_in_html.py @@ -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( + '
**strong**
**strong**
', + '
\n' + '

strong

strong

\n' + '
\n' + '
', + extensions=['md_in_html'] + ) + def test_md1_oneliner_block_start(self): # https://github.com/Python-Markdown/markdown/issues/1074 self.assertMarkdownRenders(