Fixes: https://github.com/markdown-it/markdown-it/issues/129
@ -128,7 +128,7 @@ module.exports = function list(state, startLine, endLine, silent) {
markerValue = Number(state.src.substr(start, posAfterMarker - start - 1));
token = state.push('ordered_list_open', 'ol', 1);
if (markerValue > 1) {
if (markerValue !== 1) {
token.attrs = [ [ 'start', markerValue ] ];
}
@ -108,6 +108,19 @@ test
</code></pre>
.
List starting with zero:
0. foo
1. bar
2. baz
<ol start="0">
<li>foo</li>
<li>bar</li>
<li>baz</li>
</ol>
Coverage. Directive can terminate paragraph.