In html file, if I save file with
<br>
it turns into...
<br />
I just want first one without slash and space, how can I do it? (I use Prettier if that's the reason)
In html file, if I save file with
<br>
it turns into...
<br />
I just want first one without slash and space, how can I do it? (I use Prettier if that's the reason)
Found the solution, Prettier was the problem.
What I wanted is to
get rid of unnecessary slashes in HTML files, but leave auto formatting on other files like js, python...
What I did was...
problem solved!
The desired functionality seems no longer to be supported by the "Prettier" plugin for VS Code. To use VS Code formatting for html on saving a file, add
"editor.formatOnSave": true,
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
}
to your settings.json. For a more detailed discussion see here.