taoqf / node-html-parser

A very fast HTML parser, generating a simplified DOM, with basic element query support.
MIT License
1.11k stars 107 forks source link

Documentation mistakes standards for errors #229

Open dorward opened 1 year ago

dorward commented 1 year ago

The README says:

but most usual errors are covered (eg. HTML4 style no closing <li>, <td> etc).

These are not errors, nor are they HTML 4 specific.


The end tags have been optional for those elements in every version of HTML since they were introduced.

For example, from the HTML+ spec:

<OL>
  <LI>Wake up
  <LI>Get dressed
  <LI>Have breakfast
  <LI>Drive to work
</OL>

and from the current specification:

An li element's end tag can be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element.


Please correct the documentation.