Reputation: 89
On my mac, I have VS code setup to auto format on save. That's a great feature. When working on html files, extra spaces are being added between double quotes. Sadly, it seems it is not every single time, seems to be randomly, nothing specific triggers it.
For instance
<button onchange=" callMethod() ">Click Me</button>
I could turn off auto format, but i do not wish to.
I have not seen anyone else in my searches have this issue. Can anyone assist me?
Upvotes: 3
Views: 3807
Reputation: 712
Mine was caused by an extension: Beautify 1.5.0 https://github.com/HookyQR/VSCodeBeautify/blob/master/Settings.md
Uninstalled it and everything went well
Upvotes: 3
Reputation: 1513
Try setting "editor.trimAutoWhitespace": true,
in user settings. It is possible that some other extension, is inserting the space. Play around by disabling extensions.
Upvotes: 1