1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Old handler compatability layer

This commit is contained in:
Aidan Woods 2018-03-21 17:31:40 +00:00
parent d5ded2b935
commit 40e797031e
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -1546,9 +1546,18 @@ class Parsedown
$Element['nonNestables'] = array(); $Element['nonNestables'] = array();
} }
if (is_string($Element['handler']))
{
$function = $Element['handler'];
$argument = $Element['text'];
$destination = 'rawHtml';
}
else
{
$function = $Element['handler']['function']; $function = $Element['handler']['function'];
$argument = $Element['handler']['argument']; $argument = $Element['handler']['argument'];
$destination = $Element['handler']['destination']; $destination = $Element['handler']['destination'];
}
$Element[$destination] = $this->{$function}($argument, $Element['nonNestables']); $Element[$destination] = $this->{$function}($argument, $Element['nonNestables']);
} }