summaryrefslogtreecommitdiff
path: root/tests/test_syntax/inline
diff options
context:
space:
mode:
authorfacelessuser <faceless.shop@gmail.com>2020-06-20 10:00:21 -0600
committerWaylan Limberg <waylan.limberg@icloud.com>2020-06-22 10:35:15 -0400
commitdbb9b3d766e847f1909fa0c92c6b997f0e7c868d (patch)
tree702fc9fa98480f7166d500e53fba7568d64c00d1 /tests/test_syntax/inline
parenta06659b62209de98cbc23715addb2b768a245788 (diff)
downloadpython-markdown-dbb9b3d766e847f1909fa0c92c6b997f0e7c868d.tar.gz
Fix issues with complex emphasis
Resolves issue that can occur with complex emphasis combinations. Fixes #979
Diffstat (limited to 'tests/test_syntax/inline')
-rw-r--r--tests/test_syntax/inline/test_emphasis.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_syntax/inline/test_emphasis.py b/tests/test_syntax/inline/test_emphasis.py
index b4f1d0d..1e7fafa 100644
--- a/tests/test_syntax/inline/test_emphasis.py
+++ b/tests/test_syntax/inline/test_emphasis.py
@@ -114,3 +114,17 @@ class TestNotEmphasis(TestCase):
'This text is **bold *italic* *italic* bold**',
'<p>This text is <strong>bold <em>italic</em> <em>italic</em> bold</strong></p>'
)
+
+ def test_complex_multple_emphasis_type(self):
+
+ self.assertMarkdownRenders(
+ 'traced ***along*** bla **blocked** if other ***or***',
+ '<p>traced <strong><em>along</em></strong> bla <strong>blocked</strong> if other <strong><em>or</em></strong></p>' # noqa: E501
+ )
+
+ def test_complex_multple_emphasis_type_variant2(self):
+
+ self.assertMarkdownRenders(
+ 'on the **1-4 row** of the AP Combat Table ***and*** receive',
+ '<p>on the <strong>1-4 row</strong> of the AP Combat Table <strong><em>and</em></strong> receive</p>'
+ )