Add image size support to parsedown

This commit is contained in:
Thomas Gelf 2014-02-18 17:51:08 +00:00
parent 62ca46e9cd
commit b6dbfaa6b8
1 changed files with 3 additions and 0 deletions

View File

@ -782,6 +782,9 @@ class Parsedown
{
$element['»'] = str_replace('&', '&', $element['»']);
$element['»'] = str_replace('<', '&lt;', $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['!'])
{