mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
array_keys is probably faster
This commit is contained in:
parent
6d0156d707
commit
e4bb12329e
@ -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]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user