From f7bc32eefb7f1ac446d94fb057e9da24d6176e67 Mon Sep 17 00:00:00 2001 From: Michel Fortin Date: Tue, 10 Oct 2017 20:04:05 -0400 Subject: [PATCH] Fix for issue 285: need to reset the state for regular emphasis when unwinding in toItalicsAndBold. --- Michelf/Markdown.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Michelf/Markdown.php b/Michelf/Markdown.php index c498176..08c2129 100644 --- a/Michelf/Markdown.php +++ b/Michelf/Markdown.php @@ -1395,6 +1395,7 @@ class Markdown implements MarkdownInterface { if (strlen($token_stack[0]) == 1) { $text_stack[1] .= array_shift($token_stack); $text_stack[0] .= array_shift($text_stack); + $em = ''; } // Closing strong marker: array_shift($token_stack);