I notice two things about how Stackedit handles numbered paragraphs:
- First, Stackedit restarts paragraph numbering after either (1) a table or (2) a code block.
- Second, when Stackedit infers that you are writing numbered paragraphs, it supplies a sequential number in the markup instead of supplying just a number “1” and letting the display engine figure out what number to display.
Both behaviors seem suboptimal, so I’m wondering if they are required by standards.
As to the first issue, I don’t see why a table or a code block should cause numbering to restart. Surely I could have a numbered sequence of paragraphs and want to include either a table or a code block within that sequence without restarting the numbering. I’m guessing that the numbering restarts because of the need to preface a table or code block with two hard returns, and those two hard returns are taken to mean “restart numbering” since ordinarily numbered paragraphs are separated by only one hard return. But whatever the reason, it seems like there should be a way around this.
As to the second issue, it seems to me that using 1. for every numbered paragraph is a best practice when writing Markdown since doing so prevents one from having to manually renumber paragraphs if the order changes. The Markdown processor can decide how to number paragraphs when it displays a numbered list, so why not leave the counting to it? I know that providing a hard-coded number makes it easier to read the raw markup, but that doesn’t seem like enough reason to do it. Maybe this could be a user-preference thing (i.e., users could pick whether they want Stackedit to give them sequential numbers in the markup or to give them the number 1. for every numbered paragraph).
Also, interestingly, the embedded Markdown editor for this forum does NOT supply sequential numbers for a numbered list. It doesn’t infer anything about numbered paragraphs, so the user has to choose whether to use sequential numbers or just use 1.