Add image size support to parsedown
This commit is contained in:
parent
62ca46e9cd
commit
b6dbfaa6b8
|
@ -782,6 +782,9 @@ class Parsedown
|
|||
{
|
||||
$element['»'] = str_replace('&', '&', $element['»']);
|
||||
$element['»'] = str_replace('<', '<', $element['»']);
|
||||
// TODO: this should be documented and patched upstream
|
||||
$element['»'] = preg_replace('~ =(\d+)x$~', '" width="$1', $element['»']);
|
||||
$element['»'] = preg_replace('~ =(\d+)x(\d+)$~', '" width="$1" height="$2"', $element['»']);
|
||||
|
||||
if ($element['!'])
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue