Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown lists with extra indent lead to unstable formatting behavior #16230

Open
SanderRonde opened this issue Apr 20, 2024 · 0 comments
Open

Comments

@SanderRonde
Copy link

Prettier 3.2.5
Playground link

// Options in `.prettierrc`
{
	"trailingComma": "es5",
	"useTabs": true,
	"tabWidth": 4,
	"singleQuote": true,
	"arrowParens": "always",
	"bracketSameLine": false,
	"printWidth": 80
}

Input:

-   foo
-     bar

Output:

-   foo
-     {space}{space}bar

Expected output:

-   foo
-   bar

Why?

When using the following input, running prettier will add 2 spaces. That by itself is fine (not the best choice but eh) but running prettier again will again add 2 more spaces. This keeps going on forever, every time you format the file changes, never reaching a stable state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant