Volar wrongly auto-closes some HTML tags
See original GitHub issueHi 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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
python - How do I fix wrongly nested / unclosed HTML tags?
I need to sanitize HTML submitted by the user by closing any open tags with correct nesting order. I have been looking for...
Read more >vue-tsc | Yarn - Package Manager
Vue 3 command line Type-Checking tool base on IDE plugin Volar. Roadmap: <input checked="" disabled="" type="checkbox"> Type-Checking with --noEmit ...
Read more >VS Code Extensions for HTML | CSS-Tricks
Let's look at some extensions for VS Code that make writing and editing ... It can be configured to only auto close after...
Read more >VS Code: You don't need that extension - Rob O'Leary
Auto closing HTML tags. When you add a new HTML tag, the closing tag is added automatically. 2.1. Extension. Auto Close Tag (3.1M ......
Read more >HTML Structure – Engineering Technology Services
Any variation from this structure will cause many web browsers to show the content incorrectly or not at all. Also, all HTML documents...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just have a quick look, I think we have supported
js/ts.implicitProjectConfig.checkJs
already: https://github.com/johnsoncodehk/volar/blob/26b68b6852546285d6066536d5425de9ef8634c1/packages/vue-language-server/src/inferredCompilerOptions.ts#L10-L11But why you mention
prettyhtml
? This is not related tojs/ts.implicitProjectConfig.checkJs
. Btw you can also change html formatter yourself now. See #1027.This works fine now with latest release, which changed prettyhtml to vscode formatter 😄