some list:
1. some item
2. another item
**some bold text**
3. a third item continuing the list
a new list:
2. one item
- sub item
- another sub item
3. another item
**some more bold text**
1. a new item, restarting numbering at zero
Expected result
List items to be aligned with other list items, not with sublist items. And numbering should not be affecting alignment I guess?
some list:
1. some item
1. another item
**some bold text**
1. a third item continuing the list
a new list:
1. one item
- sub item
- another sub item
1. another item
**some more bold text**
1. a new item, restarting numbering at zero
Right so the mistake I was doing is trying to continue the numbering from a previous list, which Obsidian doesn’t recognize (and as @WhiteNoise noted, probably isn’t compliant markdown syntax — I’m still learning).
What is odd though is that beginning a list with e.g. “3.” and pressing enter automatically updates the next line with “4.” (so Obsidian recognizes this as a list) but it doesn’t get rendered as a list afterwards in the Preview pane. So to be sure, is it possible, or is it not, to list items by writing a digit other than “0” ? Markdown syntax seems to suggest only “0” is correct, but Obsidian’s autocomplete suggests otherwise it seems.
#### First List
0. A
0. B
0. C
0. D
#### Second List
22. A
23. B
24. C
25. D
#### Third List
9. A
66. B
9990. C
239. D
If list numbering is incorrect when parsed, it is probably because of the line-spacing used above or below the list. Lists need to be in discrete blocks to render correctly.
With hash-based headers, you can get away with not having an empty line between the header and the list (though many people would advise using a blank line after the header / before the list).
With lists 3 and 4, which have words in bold as pseudo-headers, the list elements need to be separated by an empty line. They will then be seen as lists and formatted correctly. See the screenshot below.