Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop reporting redundant fragment parser error in foreign content
I have tested this change against the test cases from html5lib-tests. In document parsing this doesn't change any test results. In fragment parsing this fixes 7 test cases by reporting one parser error less. (That is all existing HTML parsers that pass html5lib-tests must have already implemented these steps in the order they are changed to by this commit.) The test cases where one error is reported less fall in two categories: * fragment parsing e.g. `<svg></table>` with a `tbody` HTML element as the context element => one "unexpected end tag" error is reported less (previously it was reported twice) * fragment parsing e.g. `<g></path>` with a `path` SVG element as the context element => one "found special tag while closing generic tag" error is no longer reported Fixes html5lib/html5lib-tests#173.
- Loading branch information