4 ms·
This is not HTML. This is HTML, but without allowing all kinds of shortcuts. In HTML, <li>item<li> is correct (it gets parsed as <li>item</li><li></li> I think
by Semaphor 2y ago
This is not HTML. This is HTML, but without allowing all kinds of shortcuts.
In HTML, <li>item<li> is correct (it gets parsed as <li>item</li><li></li> I think). In SuperHTML it throws an error. Essentially, this is an opinionated subset of HTML, and no one cared enough before.
- afavour 2y ago…so it’s XHTML?
- taeric 2y agoCan seem similar, but realize that the parsing rules for HTML are far more complicated than you'd think from this simple example. It is the idea of when tags are automatically closed that is odd, here. Consider how `<li><div>Hello<li>world. How <div/>Does this</li> work?` gets turned into elements. The common trap many run into is that `<div/>` essentially closes at the next boundary.
- smaudet 2y agoNot sure why I got down-voted on my other reply, but basically this. XML != HTML, not sure what is controversial to say about that.
- kristoff_it 2y agoIt's not just that, I've never seen any other HTML language server produce diagnostics at all. All the major editors use the VSCode stock HTML language server and that thing just doesn't produce any diagnostic at all.
- Semaphor 2y agoHuh. Wow. I don’t normally use VSCode, and you are correct. JetBrain IDEs correctly report some nonsense like <p><div><img></ul>test</p> as an error, but VSCode does nothing. That’s really weird.