-
-
Notifications
You must be signed in to change notification settings - Fork 449
Volar wrongly auto-closes some HTML tags #970
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
Comments
The built-in formatter feature of volar uses It is the behavior of prettyhtml that Also, it may be a more difficult approach to have the formatting features of VSCode's html language feature used only for the |
I see. Is there something missing in the |
Volar formatter is designed to be used out of the box. If you want to use more custom rules, it is recommended to use As a side note, You may want to find a formatter extension that matches your expected behavior. (Or you may need to develop your own formatter extension)
|
Hi @mariusa, I have tries customize |
Hi Johnson, Would this be possible to implement or it also depends on completely replacing Thanks! |
Just have a quick look, I think we have supported But why you mention |
Fantastic news, thanks! So in the next release, volar will apply In the current version this doesn't work yet:
|
This works fine now with latest release, which changed prettyhtml to vscode formatter :D |
Hi and hope you are getting better!
VSCode auto-closing tags works fine on .html files. It considers which elements are valid
https://stackoverflow.com/questions/1946426/html-5-is-it-br-br-or-br
eg it leaves
<br>
alone.Volar changes
<br>
to<br />
on save. (found out by disabling all other extensions)Please let VSCode handle the HTML inside
<template>
for .vue files, as it already has all kinds of rules which work fine.The text was updated successfully, but these errors were encountered: