question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Volar wrongly auto-closes some HTML tags

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
johnsoncodehkcommented, Mar 15, 2022

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-L11

But why you mention prettyhtml? This is not related to js/ts.implicitProjectConfig.checkJs. Btw you can also change html formatter yourself now. See #1027.

0reactions
mariusacommented, May 9, 2022

This works fine now with latest release, which changed prettyhtml to vscode formatter 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found