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

Merge pull request #431 from aidantwoods/patch-2

Allow parsedown to specify list start attribute
This commit is contained in:
Emanuil Rusev 2016-10-05 22:55:34 +03:00 committed by GitHub
commit f4e0234af0
2 changed files with 11 additions and 1 deletions

View File

@ -515,6 +515,16 @@ class Parsedown
),
);
if($name === 'ol')
{
$listStart = stristr($matches[0], '.', true);
if($listStart !== '1')
{
$Block['element']['attributes'] = array('start' => $listStart);
}
}
$Block['li'] = array(
'name' => 'li',
'handler' => 'li',

View File

@ -8,6 +8,6 @@
<li>two</li>
</ol>
<p>large numbers:</p>
<ol>
<ol start="123">
<li>one</li>
</ol>