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] .= ' ';
|
||||
}
|
||||
|
||||
$markerWithoutWhitespace = strstr($matches[1], ' ', true);
|
||||
|
||||
$Block = array(
|
||||
'indent' => $Line['indent'],
|
||||
'pattern' => $pattern,
|
||||
'data' => array(
|
||||
'type' => $name,
|
||||
'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(
|
||||
'name' => $name,
|
||||
|
Loading…
Reference in New Issue
Block a user