mirror of
https://github.com/erusev/parsedown.git
synced 2025-09-02 19:32:35 +02:00
Use mutating loop instead of array_map
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user