Prettier is doing some weird stuff.
Hi, I started using prettier few weeks ago and this keeps happening a lot. I tuned the settings for closing brackets which helped a bit, but some elements ( links for example) are still broken. I dont know why is this happening. I doesnt give me any errors in the log. I have the same settings as my friend and he doesnt have this problem.
4 Replies
I think it's preserving the whitespace between the tags. If you put a space before the opening tag and after the closing tag, it should fix itself
this is also just totally valid HTML btw
Yes, its valid html, but its pain to look at and hard to navigate through.
Whitespaces worked! Thanks a lot Jochem!
no worries, glad to help! If you do end up discovering a setting to have it do that automatically, let me know
Not tested but I think
"htmlWhitespaceSensitivity": "ignore"
may sort this? You could also end up with some whitespace
nodes in places you don't want them though.