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:
commit
f4e0234af0
@ -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(
|
$Block['li'] = array(
|
||||||
'name' => 'li',
|
'name' => 'li',
|
||||||
'handler' => 'li',
|
'handler' => 'li',
|
||||||
|
@ -8,6 +8,6 @@
|
|||||||
<li>two</li>
|
<li>two</li>
|
||||||
</ol>
|
</ol>
|
||||||
<p>large numbers:</p>
|
<p>large numbers:</p>
|
||||||
<ol>
|
<ol start="123">
|
||||||
<li>one</li>
|
<li>one</li>
|
||||||
</ol>
|
</ol>
|
Loading…
Reference in New Issue
Block a user