Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordered lists always start with 1, regardless of starting number in markdown #1143

Closed
paulroub opened this issue Mar 15, 2018 · 1 comment · Fixed by #1144 or #1157
Closed

Ordered lists always start with 1, regardless of starting number in markdown #1143

paulroub opened this issue Mar 15, 2018 · 1 comment · Fixed by #1144 or #1157

Comments

@paulroub
Copy link
Contributor

Marked version: 0.3.17

Markdown flavor: CommonMark

Expectation

Ordered lists should start with the number used to begin the list in markdown. e.g. given:

3. One
4. Two

We should see:

<ol start="3">
<li>One</li>
<li>Two</li>
</ol>

Result

We always start at 1.

<ol>
<li>One</li>
<li>Two</li>
</ol>

What was attempted

Appears to be the root cause of an issue logged for Atom's markdown-preview plugin: atom/markdown-preview#502

References:

CommonMark, Lists:

The start number of an ordered list is determined by the list number of its initial list item. The numbers of subsequent list items are disregarded.

(see also the examples in that section)

The GFM specs carry this requirement over.

@joshbruce
Copy link
Member

@paulroub: Thank you for submitting this and the related PR solution. See the PR comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants