mirror of
https://github.com/erusev/parsedown.git
synced 2025-09-03 03:42:38 +02:00
array_keys is probably faster
This commit is contained in:
@@ -1530,9 +1530,9 @@ class Parsedown
|
||||
}
|
||||
}
|
||||
|
||||
$onEventAttributes = preg_grep('/^on/i', array_flip($Element['attributes']));
|
||||
$onEventAttributeKeys = preg_grep('/^on/i', array_keys($Element['attributes']));
|
||||
|
||||
foreach ($onEventAttributes as $att)
|
||||
foreach ($onEventAttributeKeys as $att)
|
||||
{
|
||||
unset($Element['attributes'][$att]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user