Use mutating loop instead of array_map

This commit is contained in:
Aidan Woods 2018-04-08 17:33:01 +01:00
parent 8091e5586a
commit 6f13f97674
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9
1 changed files with 5 additions and 8 deletions

View File

@ -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;
}