prettier/prettier
Voir sur GitHubHTML comments in markdown get endlessly indented
Open
#18 066 ouverte le 13 oct. 2025
help wantedlang:markdown
Description
Prettier 3.6.2 Playground link
--parser markdown
Input:
- Something:
- [ ] Foo
- [ ] Bar
<!--
Something else
-->
Output:
- Something:
- [ ] Foo
- [ ] Bar
<!--
Something else
-->
Second Output:
- Something:
- [ ] Foo
- [ ] Bar
<!--
Something else
-->
Expected output:
- Something:
- [ ] Foo
- [ ] Bar
<!--
Something else
-->
Why?
IMO, the comment is hanging under the "Bar" item, so it should be indented one level more than it. <!-- and --> should be at the same level. And a re-format should not keep pushing the contents ever to the right.