-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
lang:markdownIssues affecting MarkdownIssues affecting Markdownstatus:needs discussionIssues needing discussion and a decision to be made before action can be takenIssues needing discussion and a decision to be made before action can be taken
Description
I would expect the output of lists, if they are going to try and align items, to align them based on the number of items in the list. Right now the alignment is fixed in a way that works for lists with double-digit list items but breaks down for both lists with only single-digit list items or triple-digit list items.
My suggestion would be to add spaces between the number and content based on the number of items in the list. This would let lists with less than 9 items get a single space while lists with more items would get spacing based on the max character count of the biggest number in the list.
Prettier 1.11.1
Playground link
Input:
## List with under 9 items
1. test
2. test
## List with over 9 items
1. test
2. test
4. test
1. test
2. test
4. test
1. test
2. test
4. test
1. test
## List with over 99 items
1. test
2. test
3. test
...
100. testOutput:
## List with under 9 items
1. test
2. test
## List with over 9 items
1. test
2. test
3. test
4. test
5. test
6. test
7. test
8. test
9. test
10. test
## List with over 99 items
1. test
2. test
3. test
...
10. test
...
100. testExpected behavior:
## List with under 9 items
1. test
2. test
## List with over 9 items
1. test
2. test
3. test
4. test
5. test
6. test
7. test
8. test
9. test
10. test
## List with over 99 items
1. test
2. test
3. test
...
10. test
...
100. testReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
lang:markdownIssues affecting MarkdownIssues affecting Markdownstatus:needs discussionIssues needing discussion and a decision to be made before action can be takenIssues needing discussion and a decision to be made before action can be taken