oblac / jodd-lagarto

Java HTML parsers suite.
https://lagarto.jodd.org
BSD 2-Clause "Simplified" License
20 stars 5 forks source link

Consider using `selfClosing` flag instead of a type #18

Open igr opened 3 years ago

igr commented 3 years ago

The one big difference from the spec is that Lagarto is not having the selfClosing flag, but only the type.

Using the type we cover all correct usages.

The only invalid usage is the end tag that is also self closed. Such a situation is currently reported as an error (according to spec) and the END tag is emitted (as it would be if we have the flag).

The only downside is that user is not able to figure out if the end tag was incorrectly self closing.