Skip to content

Commit

Permalink
Old handler compatability layer
Browse files Browse the repository at this point in the history
  • Loading branch information
aidantwoods committed Mar 27, 2018
1 parent c840b4e commit b4925f0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Parsedown.php
Original file line number Diff line number Diff line change
Expand Up @@ -1538,9 +1538,18 @@ protected function handle(array $Element)
$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']);
}
Expand Down

0 comments on commit b4925f0

Please sign in to comment.