validator / htmlparser

The Validator.nu HTML parser https://about.validator.nu/htmlparser/
Other
56 stars 26 forks source link

Enable separate testing of encoding for both “pre-parsed” and “parsed” output #49

Open sideshowbarker opened 4 years ago

sideshowbarker commented 4 years ago

The changes in the PR branch add support for correctly testing both (1) the cases where the expected result is for character coding after fully parsing the test data, as well as (2) the cases where the expected result is for the output of the encoding sniffing algoritm — and in particular, the “prescan a byte stream to determine its encoding” algorithm (aka “meta scan”).

The support is implemented by making the internal sniffing limit settable.

Relates to https://github.com/validator/htmlparser/issues/47 Relates to https://github.com/html5lib/html5lib-tests/pull/130