diff --git a/Parsedown.php b/Parsedown.php index d47a2ee..d2501a0 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -1127,14 +1127,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].'';