Resets list numbering when editing a paragraph
What's the problem
Removing a part of a paragraph that is an item in a numbered list resets the numbering of all other items to one.
What's the expected result
Do not change the numbering.
How to reproduce
- Create a multi-line numbered list
- Select and delete any word.
- All items below (sometimes including the current one) will be renumbered as "1"
Other information
https://github.com/yzhang-gh/vscode-markdown/assets/5622389/fcc019d9-145c-4183-a02f-564292bdfd86
Thanks for the report.
You are right. The current list detection method will fail when the multi-line list item has no indentation. You may avoid this issue by adding indentation to the list item before we come up with a solution.
like this
1. one
another one
2. two
another two
...
I encountered a similar behavior today. See in the following screenshots what happens to the "numbering" (it isn't numbering, it's dates 😊) when I delete the selected text.