Allow parsedown to specify list start attribute
Should fix compatibility for PHP 5.3
This commit is contained in:
parent
ed41fcf3d6
commit
f0b7b61c16
|
@ -515,7 +515,7 @@ class Parsedown
|
||||||
);
|
);
|
||||||
if($name === 'ol')
|
if($name === 'ol')
|
||||||
{
|
{
|
||||||
$list_num = explode ('.', $matches[0], 2)[0];
|
$list_num = preg_replace ('/^([0-9]+)[.].*+$/', '$1', $matches[0]);
|
||||||
if($list_num !== '1')
|
if($list_num !== '1')
|
||||||
{
|
{
|
||||||
$Block['element']['attributes'] = array('start' => $list_num);
|
$Block['element']['attributes'] = array('start' => $list_num);
|
||||||
|
|
Loading…
Reference in New Issue