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

html5: failing upstream html5lib-test #2862

Closed
flavorjones opened this issue Apr 27, 2023 · 2 comments
Closed

html5: failing upstream html5lib-test #2862

flavorjones opened this issue Apr 27, 2023 · 2 comments
Labels
topic/gumbo Gumbo HTML5 parser

Comments

@flavorjones
Copy link
Member

Yesterday a test was added upstream to resolve an open question about tree construction:

Gumbo is failing this test: https://github.com/sparklemotion/nokogiri/actions/runs/4822050310/jobs/8588763320

I should have time to work on this today.

@flavorjones flavorjones added the topic/gumbo Gumbo HTML5 parser label Apr 27, 2023
@flavorjones
Copy link
Member Author

OK, it looks like the test does not specify appropriate errors. Gumbo parses this correctly (the tree is constructed properly) but emits errors. Here's the failing test output:

Minitest::Assertion: Expected 0 errors for <div><table><svg><foreignObject><select><table><s>, found:
1:1: ERROR: Expected a doctype token
<div><table><svg><foreignObject><select><table><s>
^
1:13: ERROR: That tag isn't allowed here  Currently open tags: html, body, div, table.
<div><table><svg><foreignObject><select><table><s>
            ^
1:33: ERROR: That tag isn't allowed here  Currently open tags: html, body, div, table, svg, foreignobject.
<div><table><svg><foreignObject><select><table><s>
                                ^
1:41: ERROR: That tag isn't allowed here  Currently open tags: html, body, div, table, svg, foreignobject, select.
<div><table><svg><foreignObject><select><table><s>
                                        ^
1:41: ERROR: That tag isn't allowed here  Currently open tags: html, body, div, table, svg, foreignobject.
<div><table><svg><foreignObject><select><table><s>
                                        ^
1:48: ERROR: That tag isn't allowed here  Currently open tags: html, body, div, table.
<div><table><svg><foreignObject><select><table><s>
                                               ^
1:51: ERROR: Premature end of file  Currently open tags: html, body, div, table, s.
<div><table><svg><foreignObject><select><table><s>
                                                  ^.
Expected: 0
  Actual: 7

@flavorjones
Copy link
Member Author

Upstream PR is html5lib/html5lib-tests#166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/gumbo Gumbo HTML5 parser
Projects
None yet
Development

No branches or pull requests

1 participant