vscode-markdown
vscode-markdown copied to clipboard
wrong indentation while toggling to ordered list
What's the problem
When cycling through different list markers, the indentation consistency in nested list breaks resulting in undesired render.
What's the expected result
Toggling and cycling through markers should preserve the desired indentation in nested list.
How to reproduce
- Consider a nested list
* Level 1 * Level 2 * Level 3 * Level 4 * Level 5
- Now select the list, open command pallette (Ctrl + Shift + P), and select
Markdown All in One: Toggle List
- Cycle through the markers by running the same command again and again until ordered list
- As you can see, the indentation doesn't hold in both
1.
and1)
markers. When rendered, we can clearly see the undesired behaviour. - Tools like
markdownlint
show error telling that it expects either 0 or 3 space indents. (Even 4 space indent will render the document correctly but is not recommended)
Other information
Likewise, indentation doesn't match when starting with perfectly linted ordered list. Here, indentation comes out to be 4 spaces, which is not ideal but atleast it renders correctly, and is fixable by autocomplete.