Mismatched numbered list

Does this happen to other people? Does it bother other people?

The issue is that when I add lines or delete lines in the middle of a numbered list, the numbers in the editor pane are different than the viewer pane. For example, something like this (I apologize for not making the outline look right; there are two sub-points under the third point.)

Editor vs. Viewer
#1. 1.
#2. 2.
#4. 3.
2. 1.
3. 2.
#5. 4.

The viewer pane gives the correct "output", but it bothers me to see skipped numbers in the editor pane.

Questions:

  1. Is there something I'm doing wrong? Should I be using numbered lists differently somehow or change a setting somewhere? Or is this just how markdown works?
  2. Is there a quick way to correct the editor pane so that it looks the same as the viewer pane?

I know that I can use # to make it an outline and avoid this problem, but sometimes, all I need is a simple numbered list. I use multi-level numbered lists pretty often, so I don't like to waste time fixing this kind of cosmetic inelegance.

No Markdown basically ignores the number (see exception below) so you could use all 1's or any random sequence. When rendered the list will be correctly numbered.

Yes!

Personally I enter all numbered lists as:

1. item
1. item
1. item

which displays as

  1. item
  2. item
  3. item

The exception is the first number. The renderer will count on FROM that number and ignore whatever is typed after so

4. item
9. item
2. item

displays as

  1. item
  2. item
  3. item

This lets you manually "resume" lists broken by a line of text inbetween.

Not that I can think of apart from manually editing the raw markdown to match!

2 Likes

Thank you. That's helpful. I think I'll use the outline mode using # for anything more than a short, simple list; and I'm even more motivated to do so since there's a cool outline view plugin,

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.