mirror of
https://github.com/erusev/parsedown.git
synced 2025-09-02 19:32:35 +02:00
Old handler compatability layer
This commit is contained in:
@@ -1546,9 +1546,18 @@ class Parsedown
|
||||
$Element['nonNestables'] = array();
|
||||
}
|
||||
|
||||
$function = $Element['handler']['function'];
|
||||
$argument = $Element['handler']['argument'];
|
||||
$destination = $Element['handler']['destination'];
|
||||
if (is_string($Element['handler']))
|
||||
{
|
||||
$function = $Element['handler'];
|
||||
$argument = $Element['text'];
|
||||
$destination = 'rawHtml';
|
||||
}
|
||||
else
|
||||
{
|
||||
$function = $Element['handler']['function'];
|
||||
$argument = $Element['handler']['argument'];
|
||||
$destination = $Element['handler']['destination'];
|
||||
}
|
||||
|
||||
$Element[$destination] = $this->{$function}($argument, $Element['nonNestables']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user