Ordered list mis-numbering

markdown-it-review

(James Khan) #1

I came upon a bit of a bug where if you use an ordered list and don’t start from 1, discourse will start from 1 anyway:

Notice the numbers in the editor vs the posted reply. I kinda get why this occurs, but in this particular case, I couldn’t answer his first and second question, so could only reply to questions 3 and 4 - which presents this corner case…


False recognition of numbered lists
(Michael Downey) #2

Sometimes this can be a feature if you aren’t great at counting. :smile:

What I personally find more effective here is quoting excerpts from the post as I’ve done in this example.


(Lisa Wess) #3

This is a Markdown feature though it still recommends starting at 1. :slight_smile:


(Jeff Atwood) #4

This is how Markdown works.


(Erlend Sogge Heggen) #5

Which is kind of silly if you ask me. But not Discourse’s problem, as this should be directed at CommonMark.


(Kane York) #6

https://www.riking.org/webm/LkxuNLb8IZQ.webm


(Caue Rego) #7

Simple solution:

  1. Two. Use any other indication instead of a .
    Only issue is it won’t make a exclusive column for numbers.

3, Three. Good enough to get out of corner cases.

  1. Five. This would still look much
    better thanks to the layout when breaking line…
    but that wrong 1. there is a deal breaker!

Regardless of markdown or commonmark, does this means it’s per design also in discourse?

Or would you accept a PR to “fix” it and simply show whatever number is there? I’m kinda eager to find something to contribute (and makes sense to me) here. :stuck_out_tongue:

And couldn’t see your video embedded, @riking - must be some problem with SSL.


(Kane York) #8

It seems I wasn’t sending the intermediate certificate - try again?


(Erlend Sogge Heggen) #9

Btw, the CommonMark spec does support an arbitrary starting number as long as there’s a newline with text to separate the lists.

More discussion here:


#10

The number also changes within quoted content. I’m guessing this is still aligned with Commonmark stuff, but I was hoping that quoting would preserve the content.


(Sam Saffron) #11

I have some news!

  1. this is no longer broken

Cause :sun_behind_small_cloud: the new engine can start an OL with a number

  1. So YAY

(Sam Saffron) #12