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].'';