1
0
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:
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

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