-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
empty markdown lists #4122
Copy link
Copy link
Labels
lang:markdownIssues affecting MarkdownIssues affecting Markdownlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!Code is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!scope:dependencyIssues that cannot be solved inside Prettier itself, and must be fixed in a dependencyIssues that cannot be solved inside Prettier itself, and must be fixed in a dependency
Metadata
Metadata
Assignees
Labels
lang:markdownIssues affecting MarkdownIssues affecting Markdownlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!Code is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!scope:dependencyIssues that cannot be solved inside Prettier itself, and must be fixed in a dependencyIssues that cannot be solved inside Prettier itself, and must be fixed in a dependency
Empty markdown lists are not idempotent and eventually collapse to incorrect output.
Prettier 1.11.1
Step 1:
When there are spaces after period, they are removed
Playground link
Input:
Output:
Rendered: (this is fine)
1.
2.
3.
4.
Step 2:
When there are no spaces after period, list collapses
Playground link
Input:
Output:
Rendered: (not okay)
Step 3:
In a collapsed list, single space becomes double space
Playground link
Input:
Output:
Expected behavior: