change order of list items introduces an unnecessary space for "9."
See original GitHub issueWhat is the problem?
I have a markdown file with a numbered list of items. When changing the order using Alt-Up/Down it works fine and automatically renumbers, but when the item I am moving passes from 9 to 10 there is an extraneous space left after “9.”, making it two spaces and that is getting caught by markdown lint.
How can I reproduce it?
- Create an ordered list with at least 10 items.
List now may look like this:
1. a
2. b
3. c
4. d
5. e
6. f
7. g
8. h
9. i
10. j
- Move item 9 one step down (i.e. switch place with the 10th item). Notice an extra space has been added after “9.” making the list look like this:
1. a
2. b
3. c
4. d
5. e
6. f
7. g
8. h
9. j
10. i
Is there any error message in the console?
No
I’m using 2019.07.21.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
How to remove the space between list items - Stack Overflow
Inline elements are rendered with spacing between them whenever there's whitespace in your code. This is a good thing when it comes to...
Read more >Rearrange an array in maximum minimum form | Set 2 (O(1 ...
Given a sorted array of positive integers, rearrange the array alternately i.e first element should be the maximum value, second minimum value, ...
Read more >How to Create Custom List Numbers in Microsoft Word
Chapters: 00:00 Introduction 01:14 How to Create Custom List Numbers 03:38 How to Remove Extra Space between List Numbers and List Items ......
Read more >4 Ways To Replace Items In Python Lists | by AnBento
Introduction. While preparing for your next Python coding round, you might have noticed that algorithms requiring to manipulate one or more ...
Read more >How to Write Run-In Lists
Semicolons can separate run-in list items with internal commas. 2 ... (1) “How to Delete Extra Spaces in Microsoft Word,” (2) “How to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’d like to add 2 test cases. I think it’s pretty possible that someone embeds a code block into a list item. (
|means cursor)This test covers the case that the content of the previous list item is an indented code block:
This test covers the case that the content of the current list item is an indented code block:
@yzhang-gh , would you please create some labels, such as Area-List, Area-Math, Area-TOC, Area-Preview-and-Print, Area-SyntaxHighlighting, Area-IntelliSense-and-Completion, to sort issues by area (subject or related function)? I believe that issues in the same area are related in some aspect. And if we get them together, we can possibly find the cause of a problem more accurately.
Besides, it would be nice to have a label called “resolved” to mark those are fixed in dev build but haven’t been released.
I have seen the same problem today. It causes markdownlint to mark the affected lines with multiple errors
Use case:
I haven’t checked, but if the same logic is used for all index magnitude indenting then the issue will be repeated at list index 100 and list index 1000.