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:
parent
3fa9d62572
commit
e156c418d6
@ -1117,14 +1117,14 @@ class Parsedown
|
|||||||
|
|
||||||
if ($text[1] === $closestMarker and preg_match(self::$strongRegex[$closestMarker], $text, $matches))
|
if ($text[1] === $closestMarker and preg_match(self::$strongRegex[$closestMarker], $text, $matches))
|
||||||
{
|
{
|
||||||
$markers[] = $closestMarker;
|
$markers[$closestMarkerIndex] = $closestMarker;
|
||||||
$matches[1] = $this->parseLine($matches[1], $markers);
|
$matches[1] = $this->parseLine($matches[1], $markers);
|
||||||
|
|
||||||
$markup .= '<strong>'.$matches[1].'</strong>';
|
$markup .= '<strong>'.$matches[1].'</strong>';
|
||||||
}
|
}
|
||||||
elseif (preg_match(self::$emRegex[$closestMarker], $text, $matches))
|
elseif (preg_match(self::$emRegex[$closestMarker], $text, $matches))
|
||||||
{
|
{
|
||||||
$markers[] = $closestMarker;
|
$markers[$closestMarkerIndex] = $closestMarker;
|
||||||
$matches[1] = $this->parseLine($matches[1], $markers);
|
$matches[1] = $this->parseLine($matches[1], $markers);
|
||||||
|
|
||||||
$markup .= '<em>'.$matches[1].'</em>';
|
$markup .= '<em>'.$matches[1].'</em>';
|
||||||
|
Loading…
Reference in New Issue
Block a user