4 ms·
Rich Harris: Svelte parses HTML all wrong
- 7bit 3y agoI'm so happy he realized this behaviour is not good. I understand that svelte templates are not HTML (but a superset as he says), so I'd like to assume that whatever is wrong HTML should also be wrong Svelte-template-language. I really don't understand how people can defend using the self-closing div's etc, when this just contributes to the same set of problems they are criticising in the same sentence :smh: Glad Rich is seeing it the same way and moves forward with fixing this!
- apetresc 3y agoIf Svelte templates really are a strict superset of HTML, then doesn't that mean by definition that there is "wrong HTML" that is valid Svelte? That would only not be true if Svelte was a sub-set.
- deleted 3y ago[deleted]
- fifilura 3y agoRelevant book to use as reference. Written by Simon who worked with web standards at Opera. The race to conform with whatever browser had the biggest market share that day (typically IE, or Chrome) - meant a lot of reverse engineering. https://htmlparser.info/ https://htmlparser.info/ This chapter https://htmlparser.info/conformance-checkers/ https://htmlparser.info/conformance-checkers/ lists "Self closing tags" behind 2.46% of the errors at the time of writing. I believe there is some reference implementation somewhere too, but I couldn't find it.
- pictur 3y ago[flagged]
- kreetx 3y agoThis is a github issue to discuss this topic, not a breaking change.
- pictur 3y agoAre you serious? Is this really a github issue? Thank you very much. I didn't realize this at all when I entered the page.
- kreetx 3y agoWhat I meant to say is that if when somebody both admits their misunderstanding , admits it, then starts a discussion on what to do about it, then I don't understand the "this guy is a joke" part. Don't you wish everyone was like that?
- hk1337 3y agoI thought "self-closing" tags went away after HTML5 came along? Also not all tags are "self-closing". https://html.spec.whatwg.org/multipage/syntax.html#void-elements https://html.spec.whatwg.org/multipage/syntax.html#void-elem... div was never "self-closing", iirc.
- jitl 3y agoI really appreciate that JSX normalized self-closing tags, even if it’s not “html standard”, and I’m somewhat sad to lose that nicety in Svelte. In my view Svelte is plenty weird enough to not be HTML already, but I guess the framework owner differs.