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

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

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;
}