From e156c418d69b92ed73ec4ebbe0ecdcab404e260c Mon Sep 17 00:00:00 2001 From: Won-Kyu Park Date: Tue, 25 Feb 2014 01:13:04 +0900 Subject: [PATCH] fixup regression due to commit 59907ff7 "simplify em/strong routine" use $closestMarkerIndex correctly --- Parsedown.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Parsedown.php b/Parsedown.php index 168ecba..0f79261 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -1117,14 +1117,14 @@ class Parsedown if ($text[1] === $closestMarker and preg_match(self::$strongRegex[$closestMarker], $text, $matches)) { - $markers[] = $closestMarker; + $markers[$closestMarkerIndex] = $closestMarker; $matches[1] = $this->parseLine($matches[1], $markers); $markup .= ''.$matches[1].''; } elseif (preg_match(self::$emRegex[$closestMarker], $text, $matches)) { - $markers[] = $closestMarker; + $markers[$closestMarkerIndex] = $closestMarker; $matches[1] = $this->parseLine($matches[1], $markers); $markup .= ''.$matches[1].'';