1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

fixup regression due to commit 59907ff7 "simplify em/strong routine"

use $closestMarkerIndex correctly
This commit is contained in:
Won-Kyu Park 2014-02-25 01:13:04 +09:00
parent 3fa9d62572
commit e156c418d6

View File

@ -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 .= '<strong>'.$matches[1].'</strong>';
}
elseif (preg_match(self::$emRegex[$closestMarker], $text, $matches))
{
$markers[] = $closestMarker;
$markers[$closestMarkerIndex] = $closestMarker;
$matches[1] = $this->parseLine($matches[1], $markers);
$markup .= '<em>'.$matches[1].'</em>';