mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Use mutating loop instead of array_map
This commit is contained in:
parent
8091e5586a
commit
6f13f97674
@ -1190,14 +1190,11 @@ class Parsedown
|
||||
$InlineText = $this->inlineText($text);
|
||||
$Elements[] = $InlineText['element'];
|
||||
|
||||
$Elements = array_map(
|
||||
function ($Element) {
|
||||
$Element['autobreak'] = isset($Element['autobreak'])
|
||||
? $Element['autobreak'] : false;
|
||||
return $Element;
|
||||
},
|
||||
$Elements
|
||||
);
|
||||
foreach ($Elements as &$Element)
|
||||
{
|
||||
$Element['autobreak'] = isset($Element['autobreak'])
|
||||
? $Element['autobreak'] : false;
|
||||
}
|
||||
|
||||
return $Elements;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user