Merge pull request #260 from rhukster/master

Fix for Parsedown stripping classes on images supported by ParsedownExtra
This commit is contained in:
Emanuil Rusev 2015-01-11 14:50:08 +02:00
commit 9f58363e4b
1 changed files with 6 additions and 8 deletions

View File

@ -1305,14 +1305,12 @@ class Parsedown
$Inline['extent'] ++;
$Inline['element'] = array(
'name' => 'img',
'attributes' => array(
'src' => $Inline['element']['attributes']['href'],
'alt' => $Inline['element']['text'],
'title' => $Inline['element']['attributes']['title'],
),
);
$Inline['element']['name'] = 'img';
$Inline['element']['attributes']['src'] = $Inline['element']['attributes']['href'];
unset($Inline['element']['attributes']['href']);
$Inline['element']['attributes']['alt'] = $Inline['element']['text'];
unset($Inline['element']['text']);
return $Inline;
}