vscode-markdown
vscode-markdown copied to clipboard
Incorrect second-level list renumbering on line delete
Problem
An issue occurs with the automatic renumbering feature of ordered lists. When removing an entire line containing a top level list item, the automatic renumbering does not restart numbering between second level lists, and incorrectly "continues" the numbering instead.
At first glance, #668 appears as a related issue; however, I believe this is a separate issue.
How to reproduce
Start with this markdown:
1. Item to be deleted
2. First level 1
1. Second level 1
2. Second level 2
3. First level 2
1. Second level 1
2. Second level 2
3. First level 3
1. Second level 1
2. Second level 2
Then, delete the entire line containing Item to be deleted
. Observe that the items within First level 2
and First level 3
are incorrectly numbered.
Expected output:
1. First level 1
1. Second level 1
2. Second level 2
2. First level 2
1. Second level 1
2. Second level 2
3. First level 3
1. Second level 1
2. Second level 2
Actual output:
1. First level 1
1. Second level 1
2. Second level 2
2. First level 2
3. Second level 1
4. Second level 2
3. First level 3
5. Second level 1
6. Second level 2
GIF Demonstration
Configuration
Default. (Tested on fresh install of VS Code with only this extension installed)
Environment
- Markdown All in One: 3.4.3
- VS Code: 1.70.0 (user setup)
- OS: Windows 10 Pro, Version 21H2, Build 19044.1826, 64-bit
Diagnostic data
No relevant messages in the developer console log.
You are right. That is a bug.
Please try out the dev build.
Hi @yzhang-gh , it looks like with the latest release (3.5.0) the bug is partially fixed. While the second-level numbered list renumbering works fine by now, the more deeply nested ones still break.
Thanks. Please try out the latest dev build.