aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--markdown/inlinepatterns.py4
-rw-r--r--tests/misc/nested-patterns.html4
-rw-r--r--tests/misc/nested-patterns.txt4
3 files changed, 9 insertions, 3 deletions
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py
index b63bc8c..c9d82fd 100644
--- a/markdown/inlinepatterns.py
+++ b/markdown/inlinepatterns.py
@@ -101,8 +101,8 @@ BACKTICK_RE = r'(?<!\\)(`+)(.+?)(?<!`)\2(?!`)' # `e=f()` or ``e=f("`")``
ESCAPE_RE = r'\\(.)' # \<
EMPHASIS_RE = r'(\*)([^\*]+)\2' # *emphasis*
STRONG_RE = r'(\*{2}|_{2})(.+?)\2' # **strong**
-EM_STRONG_RE = r'(\*|_){3}(.+?)\2(.*?)\2{2}' # ***strongem*** or ***em*strong**
-STRONG_EM_RE = r'(\*|_){3}(.+?)\2{2}(.*?)\2' # ***strong**em*
+EM_STRONG_RE = r'(\*|_)\2{2}(.+?)\2(.*?)\2{2}' # ***strongem*** or ***em*strong**
+STRONG_EM_RE = r'(\*|_)\2{2}(.+?)\2{2}(.*?)\2' # ***strong**em*
SMART_EMPHASIS_RE = r'(?<!\w)(_)(?!_)(.+?)(?<!_)\2(?!\w)' # _smart_emphasis_
EMPHASIS_2_RE = r'(_)(.+?)\2' # _emphasis_
LINK_RE = NOIMG + BRK + \
diff --git a/tests/misc/nested-patterns.html b/tests/misc/nested-patterns.html
index 8c46a58..1c7bb43 100644
--- a/tests/misc/nested-patterns.html
+++ b/tests/misc/nested-patterns.html
@@ -5,4 +5,6 @@
<strong><a href="http://example.com"><em>link</em></a></strong>
<strong><a href="http://example.com"><em>link</em></a></strong>
<a href="http://example.com"><strong><em>link</em></strong></a></p>
-<p><strong><em>I am <strong><em>italic</em> and</strong> bold</em> I am <code>just</code> bold</strong></p> \ No newline at end of file
+<p><strong><em>I am <strong><em>italic</em> and</strong> bold</em> I am <code>just</code> bold</strong></p>
+<p>Example <strong><em>bold italic</em></strong> on the same line <strong><em>bold italic</em></strong>.</p>
+<p>Example <strong><em>bold italic</em></strong> on the same line <strong><em>bold italic</em></strong>.</p> \ No newline at end of file
diff --git a/tests/misc/nested-patterns.txt b/tests/misc/nested-patterns.txt
index e347ccf..9032cf1 100644
--- a/tests/misc/nested-patterns.txt
+++ b/tests/misc/nested-patterns.txt
@@ -7,3 +7,7 @@ __[*link*](http://example.com)__
[***link***](http://example.com)
***I am ___italic_ and__ bold* I am `just` bold**
+
+Example __*bold italic*__ on the same line __*bold italic*__.
+
+Example **_bold italic_** on the same line **_bold italic_**.