4 ms·
Do you have a linter or some such automated style guide that you use to enforce this style?
by tedmiston 10y ago
Do you have a linter or some such automated style guide that you use to enforce this style?
- the_mitsuhiko 10y agoNot really but pretty sure that's the default serialization of html5lib.
- gsnedders 10y agoFor now. It's likely to change however, as it makes the tree less likely to round-trip. (html5lib essentially follows what the Writing HTML Documents section non-normatively states, but this is only actually true provided the document matches the schema. There are plenty of invalid cases where it causes it to not round-trip.) FWIW, there's also some trees which are impossible to serialise in HTML-without-parse-errors which I don't expect to ever round-trip, though all such trees also fail to match the schema. A trivial example of this is `<a><table><a>`, which ends up with an a element as a child of an a element (and is, far as I'm aware, the only way except for scripting to create such a tree).