mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Avoid recomputation
This commit is contained in:
parent
d4f1ac465c
commit
107223d3a0
@ -572,13 +572,15 @@ class Parsedown
|
|||||||
$matches[1] .= ' ';
|
$matches[1] .= ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$markerWithoutWhitespace = strstr($matches[1], ' ', true);
|
||||||
|
|
||||||
$Block = array(
|
$Block = array(
|
||||||
'indent' => $Line['indent'],
|
'indent' => $Line['indent'],
|
||||||
'pattern' => $pattern,
|
'pattern' => $pattern,
|
||||||
'data' => array(
|
'data' => array(
|
||||||
'type' => $name,
|
'type' => $name,
|
||||||
'marker' => $matches[1],
|
'marker' => $matches[1],
|
||||||
'markerType' => ($name === 'ul' ? strstr($matches[1], ' ', true) : substr(strstr($matches[1], ' ', true), -1)),
|
'markerType' => ($name === 'ul' ? $markerWithoutWhitespace : substr($markerWithoutWhitespace, -1)),
|
||||||
),
|
),
|
||||||
'element' => array(
|
'element' => array(
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
|
Loading…
Reference in New Issue
Block a user