Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop reporting redundant fragment parser error in foreign content #9809

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Sep 29, 2023

  1. 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.
    not-my-profile committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    1d479e3 View commit details
    Browse the repository at this point in the history