markdown-here icon indicating copy to clipboard operation
markdown-here copied to clipboard

Ordered lists and start value

Open eschmitzer opened this issue 8 years ago • 4 comments

I've noticed a minor bug when creating a list with a start number other than "1". For example, if I type in a comment box:

3. hi
4. there
5. github

It will change the number and display the saved comment as

1. hi
2. there
3. github

This also happens if the list is out of order, such as

3. hi
9. there
22. github

If you attempt to edit the comment, the correct numbers are back where they should be.

eschmitzer avatar Nov 16 '16 21:11 eschmitzer

Your observations are the expected behaviour according to the Markdown specification.

It’s important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces.

It goes on to list your explicit example where the actual numbers have no effect. Then goes on to say the following.

At some point in the future, Markdown may support starting ordered lists at an arbitrary number.

courtney-miles avatar Feb 20 '17 11:02 courtney-miles

i am trying to fetch data from qnamaker. It contains un ordered sub list it is working in qnamaker test chat window but it is not supporting in webchat.

anumeshyerigeri avatar Jun 01 '17 04:06 anumeshyerigeri

I've just come up against this. I was quoting a list item which was number 6 on the list I was quoting like:

  1. some point

But when it rendered it was:

  1. Some point

This was in Outlook Web Access.

The CommonMark spec allows arbitrary start numbers: https://spec.commonmark.org/0.28/#start-number

gajama avatar Dec 09 '19 14:12 gajama

I've got a fix. Will submit a PR.

gajama avatar Dec 09 '19 21:12 gajama