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:
commit
9f58363e4b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user