From f0aae24e88f16f36588518b316f397cf4d5d39e6 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Fri, 14 Oct 2022 19:39:41 +0300 Subject: [PATCH 1/6] test: rebase html5lib-test --- crates/swc_html_parser/tests/html5lib-tests | 2 +- .../tests20_dat/39/dom.rust-debug | 6 +- .../tests20_dat/39/input.html | 2 +- .../tests20_dat/39/output.json | 20 +++---- .../tests20_dat/39/output.stderr | 1 - .../tests20_dat/39/span.rust-debug | 32 +++++------ .../tests20_dat/41/dom.rust-debug | 7 ++- .../tests20_dat/41/input.html | 2 +- .../tests20_dat/41/output.json | 52 ++++++++++-------- .../tests20_dat/41/output.stderr | 5 +- .../tests20_dat/41/span.rust-debug | 42 +++++++++----- .../tests20_dat/42/dom.rust-debug | 5 +- .../tests20_dat/42/input.html | 2 +- .../tests20_dat/42/output.json | 55 ++++++++++++------- .../tests20_dat/42/output.stderr | 5 +- .../tests20_dat/42/span.rust-debug | 34 ++++++++---- .../tests20_dat/43/dom.rust-debug | 3 +- .../tests20_dat/43/input.html | 2 +- .../tests20_dat/43/output.json | 22 ++------ .../tests20_dat/43/output.stderr | 2 +- .../tests20_dat/43/span.rust-debug | 28 +++------- .../tests20_dat/44/dom.rust-debug | 2 +- .../tests20_dat/44/input.html | 2 +- .../tests20_dat/44/output.json | 6 +- .../tests20_dat/44/output.stderr | 2 +- .../tests20_dat/44/span.rust-debug | 20 +++---- .../tests20_dat/45/dom.rust-debug | 4 +- .../tests20_dat/45/input.html | 2 +- .../tests20_dat/45/output.json | 37 ++++++------- .../tests20_dat/45/output.stderr | 3 +- .../tests20_dat/45/span.rust-debug | 24 ++++---- .../tests20_dat/46/dom.rust-debug | 4 +- .../tests20_dat/46/input.html | 2 +- .../tests20_dat/46/output.json | 8 +-- .../tests20_dat/46/output.stderr | 1 - .../tests20_dat/46/span.rust-debug | 18 +++--- .../tests20_dat/47/input.html | 2 +- .../tests20_dat/47/output.json | 4 +- .../tests20_dat/47/output.stderr | 3 +- .../tests20_dat/47/span.rust-debug | 20 +++---- .../tests20_dat/48/dom.rust-debug | 5 +- .../tests20_dat/48/input.html | 2 +- .../tests20_dat/48/output.json | 33 +++-------- .../tests20_dat/48/output.stderr | 3 +- .../tests20_dat/48/span.rust-debug | 36 ++++-------- .../tests20_dat/49/dom.rust-debug | 4 +- .../tests20_dat/49/input.html | 2 +- .../tests20_dat/49/output.json | 22 +++++--- .../tests20_dat/49/output.stderr | 2 +- .../tests20_dat/49/span.rust-debug | 34 ++++++------ .../tests20_dat/50/dom.rust-debug | 7 ++- .../tests20_dat/50/input.html | 2 +- .../tests20_dat/50/output.json | 46 +++++++++------- .../tests20_dat/50/output.stderr | 3 +- .../tests20_dat/50/span.rust-debug | 42 +++++++++----- .../tests20_dat/51/dom.rust-debug | 3 +- .../tests20_dat/51/input.html | 2 +- .../tests20_dat/51/output.json | 50 +++++++++++------ .../tests20_dat/51/output.stderr | 3 +- .../tests20_dat/51/span.rust-debug | 32 +++++++---- .../tests20_dat/52/dom.rust-debug | 5 +- .../tests20_dat/52/input.html | 2 +- .../tests20_dat/52/output.json | 31 +++-------- .../tests20_dat/52/output.stderr | 4 +- .../tests20_dat/52/span.rust-debug | 32 ++++------- .../tests20_dat/53/dom.rust-debug | 1 - .../tests20_dat/53/input.html | 2 +- .../tests20_dat/53/output.json | 27 ++------- .../tests20_dat/53/output.stderr | 4 +- .../tests20_dat/53/span.rust-debug | 34 +++++------- .../tests20_dat/54/dom.rust-debug | 4 +- .../tests20_dat/54/input.html | 2 +- .../tests20_dat/54/output.json | 43 +++++++-------- .../tests20_dat/54/output.stderr | 3 +- .../tests20_dat/54/span.rust-debug | 32 +++++------ .../tests20_dat/55/dom.rust-debug | 2 +- .../tests20_dat/55/input.html | 2 +- .../tests20_dat/55/output.json | 4 +- .../tests20_dat/55/span.rust-debug | 16 +++--- .../tests20_dat/56/dom.rust-debug | 2 +- .../tests20_dat/56/input.html | 2 +- .../tests20_dat/56/output.json | 16 +++--- .../tests20_dat/56/output.stderr | 2 +- .../tests20_dat/56/span.rust-debug | 32 +++++------ .../tests20_dat/57/dom.rust-debug | 2 +- .../tests20_dat/57/input.html | 2 +- .../tests20_dat/57/output.json | 4 +- .../tests20_dat/57/span.rust-debug | 16 +++--- .../tests20_dat/58/dom.rust-debug | 4 +- .../tests20_dat/58/input.html | 2 +- .../tests20_dat/58/output.json | 43 ++++++++------- .../tests20_dat/58/output.stderr | 3 +- .../tests20_dat/58/span.rust-debug | 32 +++++------ .../tests20_dat/59/dom.rust-debug | 3 +- .../tests20_dat/59/input.html | 2 +- .../tests20_dat/59/output.json | 36 +++++++++--- .../tests20_dat/59/output.stderr | 3 +- .../tests20_dat/59/span.rust-debug | 36 +++++++----- .../tests20_dat/60/dom.rust-debug | 2 +- .../tests20_dat/60/input.html | 2 +- .../tests20_dat/60/output.json | 4 +- .../tests20_dat/60/span.rust-debug | 14 ++--- .../tests20_dat/61/dom.rust-debug | 2 +- .../tests20_dat/61/input.html | 2 +- .../tests20_dat/61/output.json | 14 ++--- .../tests20_dat/61/output.stderr | 2 +- .../tests20_dat/61/span.rust-debug | 30 +++++----- .../tests20_dat/62/dom.rust-debug | 2 +- .../tests20_dat/62/input.html | 2 +- .../tests20_dat/62/output.json | 16 +++--- .../tests20_dat/62/output.stderr | 4 +- .../tests20_dat/62/span.rust-debug | 30 +++++----- .../tests20_dat/63/dom.rust-debug | 3 +- .../tests20_dat/63/input.html | 2 +- .../tests20_dat/63/output.json | 31 +++-------- .../tests20_dat/63/output.stderr | 4 +- .../tests20_dat/63/span.rust-debug | 40 +++++--------- 117 files changed, 759 insertions(+), 765 deletions(-) diff --git a/crates/swc_html_parser/tests/html5lib-tests b/crates/swc_html_parser/tests/html5lib-tests index 538a6cd2a014..038c06635ae5 160000 --- a/crates/swc_html_parser/tests/html5lib-tests +++ b/crates/swc_html_parser/tests/html5lib-tests @@ -1 +1 @@ -Subproject commit 538a6cd2a014eff08a35964a1995643b63fc02b9 +Subproject commit 038c06635ae54f700fee3154acb4d45fb3dcae8d diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/dom.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/dom.rust-debug index 5076b2ee59bf..cf0619a54fee 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/dom.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/dom.rust-debug @@ -2,6 +2,6 @@ | | | -|
-|
a \ No newline at end of file +x \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/output.json b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/output.json index f5c843d3e628..bb73c6f208af 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/output.json +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/output.json @@ -2,7 +2,7 @@ "type": "Document", "span": { "start": 1, - "end": 44, + "end": 37, "ctxt": 0 }, "mode": "no-quirks", @@ -59,21 +59,21 @@ "type": "Element", "span": { "start": 16, - "end": 43, + "end": 36, "ctxt": 0 }, - "tagName": "address", + "tagName": "button", "namespace": "http://www.w3.org/1999/xhtml", "attributes": [], "children": [ { "type": "Element", "span": { - "start": 25, - "end": 33, + "start": 24, + "end": 27, "ctxt": 0 }, - "tagName": "button", + "tagName": "p", "namespace": "http://www.w3.org/1999/xhtml", "attributes": [], "children": [], @@ -87,12 +87,12 @@ { "type": "Text", "span": { - "start": 43, - "end": 44, + "start": 36, + "end": 37, "ctxt": 0 }, - "data": "a", - "raw": "a" + "data": "x", + "raw": "x" } ], "content": null, diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/output.stderr b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/output.stderr index 7b3a1f8e3c88..e69de29bb2d1 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/output.stderr +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/output.stderr @@ -1 +0,0 @@ -(1,42): end-tag-too-early \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/span.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/span.rust-debug index ad6a48d4ce50..3e9068f9caa9 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/span.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/39/span.rust-debug @@ -1,19 +1,19 @@ x Document ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/39/input.html:1:1] - 1 |
a - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + 1 | x + : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/39/input.html:1:1] - 1 |
a + 1 | x : ^^^^^^^^^^^^^^^ `---- x DocumentType ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/39/input.html:1:1] - 1 |
a + 1 | x : ^^^^^^^^^^^^^^^ `---- @@ -23,36 +23,36 @@ x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/39/input.html:1:1] - 1 |
a - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + 1 | x + : ^^^^^^^^^^^^^^^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/39/input.html:1:1] - 1 |
a - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + 1 | x + : ^^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/39/input.html:1:1] - 1 |
a - : ^^^^^^^^ + 1 | x + : ^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/39/input.html:1:1] - 1 |
a - : ^^^^^^^^ + 1 | x + : ^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/39/input.html:1:1] - 1 |
a - : ^ + 1 | x + : ^ `---- x Text ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/39/input.html:1:1] - 1 |
a - : ^ + 1 | x + : ^ `---- diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/dom.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/dom.rust-debug index 7738a2be8509..5076b2ee59bf 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/dom.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/dom.rust-debug @@ -1,6 +1,7 @@ +| | | | -|

-|

-| +|
+|

\ No newline at end of file +
a \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/output.json b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/output.json index df053432c26c..f5c843d3e628 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/output.json +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/output.json @@ -2,11 +2,23 @@ "type": "Document", "span": { "start": 1, - "end": 15, + "end": 44, "ctxt": 0 }, - "mode": "quirks", + "mode": "no-quirks", "children": [ + { + "type": "DocumentType", + "span": { + "start": 1, + "end": 16, + "ctxt": 0 + }, + "name": "html", + "publicId": null, + "systemId": null, + "raw": "" + }, { "type": "Element", "span": { @@ -46,36 +58,22 @@ { "type": "Element", "span": { - "start": 1, - "end": 15, + "start": 16, + "end": 43, "ctxt": 0 }, - "tagName": "p", + "tagName": "address", "namespace": "http://www.w3.org/1999/xhtml", "attributes": [], "children": [ { "type": "Element", "span": { - "start": 11, - "end": 15, - "ctxt": 0 - }, - "tagName": "p", - "namespace": "http://www.w3.org/1999/xhtml", - "attributes": [], - "children": [], - "content": null, - "isSelfClosing": false - }, - { - "type": "Element", - "span": { - "start": 4, - "end": 15, + "start": 25, + "end": 33, "ctxt": 0 }, - "tagName": "table", + "tagName": "button", "namespace": "http://www.w3.org/1999/xhtml", "attributes": [], "children": [], @@ -85,6 +83,16 @@ ], "content": null, "isSelfClosing": false + }, + { + "type": "Text", + "span": { + "start": 43, + "end": 44, + "ctxt": 0 + }, + "data": "a", + "raw": "a" } ], "content": null, diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/output.stderr b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/output.stderr index 9b710b4e1096..7b3a1f8e3c88 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/output.stderr +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/output.stderr @@ -1,4 +1 @@ -(1,3): expected-doctype-but-got-start-tag -(1,14): unexpected-end-tag-implies-table-voodoo -(1,14): unexpected-end-tag -(1,14): eof-in-table \ No newline at end of file +(1,42): end-tag-too-early \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/span.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/span.rust-debug index 15991c3cfb9c..a36351d9b81e 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/span.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/41/span.rust-debug @@ -1,8 +1,20 @@ x Document ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/41/input.html:1:1] - 1 |

- : ^^^^^^^^^^^^^^ + 1 |
a + : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + `---- + + x Child + ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/41/input.html:1:1] + 1 |
a + : ^^^^^^^^^^^^^^^ + `---- + + x DocumentType + ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/41/input.html:1:1] + 1 |
a + : ^^^^^^^^^^^^^^^ `---- x Child @@ -11,36 +23,36 @@ x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/41/input.html:1:1] - 1 |

- : ^^^^^^^^^^^^^^ + 1 |
a + : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/41/input.html:1:1] - 1 |

- : ^^^^^^^^^^^^^^ + 1 |
a + : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/41/input.html:1:1] - 1 |

- : ^^^^ + 1 |
a + : ^^^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/41/input.html:1:1] - 1 |

- : ^^^^ + 1 |
a + : ^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/41/input.html:1:1] - 1 |

- : ^^^^^^^^^^^ + 1 |
a + : ^ `---- - x Element + x Text ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/41/input.html:1:1] - 1 |

- : ^^^^^^^^^^^ + 1 |
a + : ^ `---- diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/dom.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/dom.rust-debug index e19b0e1a4c58..7738a2be8509 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/dom.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/dom.rust-debug @@ -1,5 +1,6 @@ -| | | | -| +|

+|

+|

diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/input.html b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/input.html index 297fd7c6f963..41f6e8b8a4d8 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/input.html +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/input.html @@ -1 +1 @@ - \ No newline at end of file +

\ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/output.json b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/output.json index 56219252126d..df053432c26c 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/output.json +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/output.json @@ -2,23 +2,11 @@ "type": "Document", "span": { "start": 1, - "end": 21, + "end": 15, "ctxt": 0 }, - "mode": "no-quirks", + "mode": "quirks", "children": [ - { - "type": "DocumentType", - "span": { - "start": 1, - "end": 16, - "ctxt": 0 - }, - "name": "html", - "publicId": null, - "systemId": null, - "raw": "" - }, { "type": "Element", "span": { @@ -58,14 +46,43 @@ { "type": "Element", "span": { - "start": 16, - "end": 21, + "start": 1, + "end": 15, "ctxt": 0 }, - "tagName": "svg", - "namespace": "http://www.w3.org/2000/svg", + "tagName": "p", + "namespace": "http://www.w3.org/1999/xhtml", "attributes": [], - "children": [], + "children": [ + { + "type": "Element", + "span": { + "start": 11, + "end": 15, + "ctxt": 0 + }, + "tagName": "p", + "namespace": "http://www.w3.org/1999/xhtml", + "attributes": [], + "children": [], + "content": null, + "isSelfClosing": false + }, + { + "type": "Element", + "span": { + "start": 4, + "end": 15, + "ctxt": 0 + }, + "tagName": "table", + "namespace": "http://www.w3.org/1999/xhtml", + "attributes": [], + "children": [], + "content": null, + "isSelfClosing": false + } + ], "content": null, "isSelfClosing": false } diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/output.stderr b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/output.stderr index 670f981aad08..9b710b4e1096 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/output.stderr +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/output.stderr @@ -1 +1,4 @@ -(1,20): expected-closing-tag-but-got-eof \ No newline at end of file +(1,3): expected-doctype-but-got-start-tag +(1,14): unexpected-end-tag-implies-table-voodoo +(1,14): unexpected-end-tag +(1,14): eof-in-table \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/span.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/span.rust-debug index a46b588a77c0..1d5db0ef4ab5 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/span.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/42/span.rust-debug @@ -1,34 +1,46 @@ x Document ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/42/input.html:1:1] - 1 | - : ^^^^^^^^^^^^^^^^^^^^ + 1 |

+ : ^^^^^^^^^^^^^^ `---- + x Child + + x Element + x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/42/input.html:1:1] - 1 | - : ^^^^^^^^^^^^^^^ + 1 |

+ : ^^^^^^^^^^^^^^ `---- - x DocumentType + x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/42/input.html:1:1] - 1 | - : ^^^^^^^^^^^^^^^ + 1 |

+ : ^^^^^^^^^^^^^^ `---- x Child + ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/42/input.html:1:1] + 1 |

+ : ^^^^ + `---- x Element + ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/42/input.html:1:1] + 1 |

+ : ^^^^ + `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/42/input.html:1:1] - 1 | - : ^^^^^ + 1 |

+ : ^^^^^^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/42/input.html:1:1] - 1 | - : ^^^^^ + 1 |

+ : ^^^^^^^^^^^ `---- diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/dom.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/dom.rust-debug index 32047cfa22ce..e19b0e1a4c58 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/dom.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/dom.rust-debug @@ -2,5 +2,4 @@ | | | -|

-|

+| diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/input.html b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/input.html index e7bfdbeaa14c..297fd7c6f963 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/input.html +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/input.html @@ -1 +1 @@ -

\ No newline at end of file + \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/output.json b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/output.json index 0294b235d3fa..56219252126d 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/output.json +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/output.json @@ -2,7 +2,7 @@ "type": "Document", "span": { "start": 1, - "end": 31, + "end": 21, "ctxt": 0 }, "mode": "no-quirks", @@ -59,25 +59,11 @@ "type": "Element", "span": { "start": 16, - "end": 19, + "end": 21, "ctxt": 0 }, - "tagName": "p", - "namespace": "http://www.w3.org/1999/xhtml", - "attributes": [], - "children": [], - "content": null, - "isSelfClosing": false - }, - { - "type": "Element", - "span": { - "start": 19, - "end": 31, - "ctxt": 0 - }, - "tagName": "figcaption", - "namespace": "http://www.w3.org/1999/xhtml", + "tagName": "svg", + "namespace": "http://www.w3.org/2000/svg", "attributes": [], "children": [], "content": null, diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/output.stderr b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/output.stderr index 2fea4bfd93a7..670f981aad08 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/output.stderr +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/output.stderr @@ -1 +1 @@ -(1,30): expected-closing-tag-but-got-eof \ No newline at end of file +(1,20): expected-closing-tag-but-got-eof \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/span.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/span.rust-debug index 07902ad38090..d18bd4a9c1c9 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/span.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/43/span.rust-debug @@ -1,19 +1,19 @@ x Document ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/43/input.html:1:1] - 1 |

- : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + 1 | + : ^^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/43/input.html:1:1] - 1 |

+ 1 | : ^^^^^^^^^^^^^^^ `---- x DocumentType ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/43/input.html:1:1] - 1 |

+ 1 | : ^^^^^^^^^^^^^^^ `---- @@ -23,24 +23,12 @@ x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/43/input.html:1:1] - 1 |

- : ^^^ + 1 | + : ^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/43/input.html:1:1] - 1 |

- : ^^^ - `---- - - x Child - ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/43/input.html:1:1] - 1 |

- : ^^^^^^^^^^^^ - `---- - - x Element - ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/43/input.html:1:1] - 1 |

- : ^^^^^^^^^^^^ + 1 | + : ^^^^^ `---- diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/dom.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/dom.rust-debug index 118232d1daaf..32047cfa22ce 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/dom.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/dom.rust-debug @@ -3,4 +3,4 @@ | | |

-|

+|
diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/input.html b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/input.html index d1d7067cf712..e7bfdbeaa14c 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/input.html +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/input.html @@ -1 +1 @@ -

\ No newline at end of file +

\ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/output.json b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/output.json index 7e2430988d80..0294b235d3fa 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/output.json +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/output.json @@ -2,7 +2,7 @@ "type": "Document", "span": { "start": 1, - "end": 28, + "end": 31, "ctxt": 0 }, "mode": "no-quirks", @@ -73,10 +73,10 @@ "type": "Element", "span": { "start": 19, - "end": 28, + "end": 31, "ctxt": 0 }, - "tagName": "summary", + "tagName": "figcaption", "namespace": "http://www.w3.org/1999/xhtml", "attributes": [], "children": [], diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/output.stderr b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/output.stderr index 7ff3e2ebe8ee..2fea4bfd93a7 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/output.stderr +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/output.stderr @@ -1 +1 @@ -(1,27): expected-closing-tag-but-got-eof \ No newline at end of file +(1,30): expected-closing-tag-but-got-eof \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/span.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/span.rust-debug index c0be718fc2af..0c71a7388db8 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/span.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/44/span.rust-debug @@ -1,19 +1,19 @@ x Document ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/44/input.html:1:1] - 1 |

- : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + 1 |

+ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/44/input.html:1:1] - 1 |

+ 1 |

: ^^^^^^^^^^^^^^^ `---- x DocumentType ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/44/input.html:1:1] - 1 |

+ 1 |

: ^^^^^^^^^^^^^^^ `---- @@ -23,24 +23,24 @@ x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/44/input.html:1:1] - 1 |

+ 1 |

: ^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/44/input.html:1:1] - 1 |

+ 1 |

: ^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/44/input.html:1:1] - 1 |

- : ^^^^^^^^^ + 1 |

+ : ^^^^^^^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/44/input.html:1:1] - 1 |

- : ^^^^^^^^^ + 1 |

+ : ^^^^^^^^^^^^ `---- diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/dom.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/dom.rust-debug index 1cd2427b584f..118232d1daaf 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/dom.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/dom.rust-debug @@ -2,5 +2,5 @@ | | | -|
-|
+|

+|

diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/input.html b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/input.html index 37e990092604..d1d7067cf712 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/input.html +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/input.html @@ -1 +1 @@ -
\ No newline at end of file +

\ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/output.json b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/output.json index 4a55d8e0fb6e..7e2430988d80 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/output.json +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/output.json @@ -2,7 +2,7 @@ "type": "Document", "span": { "start": 1, - "end": 35, + "end": 28, "ctxt": 0 }, "mode": "no-quirks", @@ -59,28 +59,27 @@ "type": "Element", "span": { "start": 16, - "end": 35, + "end": 19, "ctxt": 0 }, - "tagName": "form", + "tagName": "p", "namespace": "http://www.w3.org/1999/xhtml", "attributes": [], - "children": [ - { - "type": "Element", - "span": { - "start": 22, - "end": 35, - "ctxt": 0 - }, - "tagName": "table", - "namespace": "http://www.w3.org/1999/xhtml", - "attributes": [], - "children": [], - "content": null, - "isSelfClosing": false - } - ], + "children": [], + "content": null, + "isSelfClosing": false + }, + { + "type": "Element", + "span": { + "start": 19, + "end": 28, + "ctxt": 0 + }, + "tagName": "summary", + "namespace": "http://www.w3.org/1999/xhtml", + "attributes": [], + "children": [], "content": null, "isSelfClosing": false } diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/output.stderr b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/output.stderr index 9fce433b849c..7ff3e2ebe8ee 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/output.stderr +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/output.stderr @@ -1,2 +1 @@ -(1,34): unexpected-form-in-table -(1,34): eof-in-table \ No newline at end of file +(1,27): expected-closing-tag-but-got-eof \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/span.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/span.rust-debug index 8927cadb7218..253813e70f49 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/span.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/45/span.rust-debug @@ -1,19 +1,19 @@ x Document ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/45/input.html:1:1] - 1 |
- : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + 1 |

+ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/45/input.html:1:1] - 1 |
+ 1 |

: ^^^^^^^^^^^^^^^ `---- x DocumentType ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/45/input.html:1:1] - 1 |
+ 1 |

: ^^^^^^^^^^^^^^^ `---- @@ -23,24 +23,24 @@ x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/45/input.html:1:1] - 1 |
- : ^^^^^^^^^^^^^^^^^^^ + 1 |

+ : ^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/45/input.html:1:1] - 1 |
- : ^^^^^^^^^^^^^^^^^^^ + 1 |

+ : ^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/45/input.html:1:1] - 1 |
- : ^^^^^^^^^^^^^ + 1 |

+ : ^^^^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/45/input.html:1:1] - 1 |
- : ^^^^^^^^^^^^^ + 1 |

+ : ^^^^^^^^^ `---- diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/dom.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/dom.rust-debug index b159a4bf4822..1cd2427b584f 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/dom.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/dom.rust-debug @@ -2,5 +2,5 @@ | | | -|
-| +| +|
diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/input.html b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/input.html index 31080e0d36a5..37e990092604 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/input.html +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/input.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/output.json b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/output.json index 5b70b66d5e53..4a55d8e0fb6e 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/output.json +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/output.json @@ -62,18 +62,18 @@ "end": 35, "ctxt": 0 }, - "tagName": "table", + "tagName": "form", "namespace": "http://www.w3.org/1999/xhtml", "attributes": [], "children": [ { "type": "Element", "span": { - "start": 23, - "end": 29, + "start": 22, + "end": 35, "ctxt": 0 }, - "tagName": "form", + "tagName": "table", "namespace": "http://www.w3.org/1999/xhtml", "attributes": [], "children": [], diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/output.stderr b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/output.stderr index 23e864e35243..9fce433b849c 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/output.stderr +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/output.stderr @@ -1,3 +1,2 @@ -(1,28): unexpected-form-in-table (1,34): unexpected-form-in-table (1,34): eof-in-table \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/span.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/span.rust-debug index dddd5069b039..e34708694bb3 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/span.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/46/span.rust-debug @@ -1,19 +1,19 @@ x Document ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/46/input.html:1:1] - 1 |
+ 1 |
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/46/input.html:1:1] - 1 |
+ 1 |
: ^^^^^^^^^^^^^^^ `---- x DocumentType ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/46/input.html:1:1] - 1 |
+ 1 |
: ^^^^^^^^^^^^^^^ `---- @@ -23,24 +23,24 @@ x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/46/input.html:1:1] - 1 |
+ 1 |
: ^^^^^^^^^^^^^^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/46/input.html:1:1] - 1 |
+ 1 |
: ^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/46/input.html:1:1] - 1 |
- : ^^^^^^ + 1 |
+ : ^^^^^^^^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/46/input.html:1:1] - 1 |
- : ^^^^^^ + 1 |
+ : ^^^^^^^^^^^^^ `---- diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/input.html b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/input.html index a6a70901af1c..31080e0d36a5 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/input.html +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/input.html @@ -1 +1 @@ -
\ No newline at end of file + \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/output.json b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/output.json index 19e849a47fc2..5b70b66d5e53 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/output.json +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/output.json @@ -2,7 +2,7 @@ "type": "Document", "span": { "start": 1, - "end": 43, + "end": 35, "ctxt": 0 }, "mode": "no-quirks", @@ -59,7 +59,7 @@ "type": "Element", "span": { "start": 16, - "end": 37, + "end": 35, "ctxt": 0 }, "tagName": "table", diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/output.stderr b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/output.stderr index 37ac11370f04..23e864e35243 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/output.stderr +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/output.stderr @@ -1,2 +1,3 @@ (1,28): unexpected-form-in-table -(1,42): unexpected-start-tag \ No newline at end of file +(1,34): unexpected-form-in-table +(1,34): eof-in-table \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/span.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/span.rust-debug index 0e94ef9eb3d4..3cf8a770c707 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/span.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/47/span.rust-debug @@ -1,19 +1,19 @@ x Document ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/47/input.html:1:1] - 1 |
- : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + 1 | + : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/47/input.html:1:1] - 1 |
+ 1 | : ^^^^^^^^^^^^^^^ `---- x DocumentType ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/47/input.html:1:1] - 1 |
+ 1 | : ^^^^^^^^^^^^^^^ `---- @@ -23,24 +23,24 @@ x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/47/input.html:1:1] - 1 |
- : ^^^^^^^^^^^^^^^^^^^^^ + 1 | + : ^^^^^^^^^^^^^^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/47/input.html:1:1] - 1 |
- : ^^^^^^^^^^^^^^^^^^^^^ + 1 | + : ^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/47/input.html:1:1] - 1 |
+ 1 | : ^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/47/input.html:1:1] - 1 |
+ 1 | : ^^^^^^ `---- diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/dom.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/dom.rust-debug index 4064499a6822..b159a4bf4822 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/dom.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/dom.rust-debug @@ -2,6 +2,5 @@ | | | -| -| -|

+|

+| diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/input.html b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/input.html index 8bf229b966d3..a6a70901af1c 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/input.html +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/input.html @@ -1 +1 @@ -

\ No newline at end of file +

\ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/output.json b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/output.json index c13ebaaf201c..19e849a47fc2 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/output.json +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/output.json @@ -2,7 +2,7 @@ "type": "Document", "span": { "start": 1, - "end": 39, + "end": 43, "ctxt": 0 }, "mode": "no-quirks", @@ -59,39 +59,24 @@ "type": "Element", "span": { "start": 16, - "end": 39, + "end": 37, "ctxt": 0 }, - "tagName": "svg", - "namespace": "http://www.w3.org/2000/svg", + "tagName": "table", + "namespace": "http://www.w3.org/1999/xhtml", "attributes": [], "children": [ { "type": "Element", "span": { - "start": 21, - "end": 39, + "start": 23, + "end": 29, "ctxt": 0 }, - "tagName": "foreignObject", - "namespace": "http://www.w3.org/2000/svg", + "tagName": "form", + "namespace": "http://www.w3.org/1999/xhtml", "attributes": [], - "children": [ - { - "type": "Element", - "span": { - "start": 36, - "end": 39, - "ctxt": 0 - }, - "tagName": "p", - "namespace": "http://www.w3.org/1999/xhtml", - "attributes": [], - "children": [], - "content": null, - "isSelfClosing": false - } - ], + "children": [], "content": null, "isSelfClosing": false } diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/output.stderr b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/output.stderr index eda05e09da45..37ac11370f04 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/output.stderr +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/output.stderr @@ -1 +1,2 @@ -(1,38): expected-closing-tag-but-got-eof \ No newline at end of file +(1,28): unexpected-form-in-table +(1,42): unexpected-start-tag \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/span.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/span.rust-debug index 0ba61175da52..1449f9f05fa5 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/span.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/48/span.rust-debug @@ -1,19 +1,19 @@ x Document ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/48/input.html:1:1] - 1 |

- : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + 1 |
+ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/48/input.html:1:1] - 1 |

+ 1 |
: ^^^^^^^^^^^^^^^ `---- x DocumentType ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/48/input.html:1:1] - 1 |

+ 1 |
: ^^^^^^^^^^^^^^^ `---- @@ -23,36 +23,24 @@ x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/48/input.html:1:1] - 1 |

- : ^^^^^^^^^^^^^^^^^^^^^^^ + 1 |
+ : ^^^^^^^^^^^^^^^^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/48/input.html:1:1] - 1 |

- : ^^^^^^^^^^^^^^^^^^^^^^^ + 1 |
+ : ^^^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/48/input.html:1:1] - 1 |

- : ^^^^^^^^^^^^^^^^^^ + 1 |
+ : ^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/48/input.html:1:1] - 1 |

- : ^^^^^^^^^^^^^^^^^^ - `---- - - x Child - ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/48/input.html:1:1] - 1 |

- : ^^^ - `---- - - x Element - ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/48/input.html:1:1] - 1 |

- : ^^^ + 1 |
+ : ^^^^^^ `---- diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/dom.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/dom.rust-debug index 3ec0aed348df..4064499a6822 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/dom.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/dom.rust-debug @@ -3,5 +3,5 @@ | | | -| -| "abc" +| +|

diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/input.html b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/input.html index 3c14ed1f4006..8bf229b966d3 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/input.html +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/input.html @@ -1 +1 @@ -abc \ No newline at end of file +

\ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/output.json b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/output.json index 6e5b21d51bcb..c13ebaaf201c 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/output.json +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/output.json @@ -2,7 +2,7 @@ "type": "Document", "span": { "start": 1, - "end": 31, + "end": 39, "ctxt": 0 }, "mode": "no-quirks", @@ -59,7 +59,7 @@ "type": "Element", "span": { "start": 16, - "end": 31, + "end": 39, "ctxt": 0 }, "tagName": "svg", @@ -70,22 +70,26 @@ "type": "Element", "span": { "start": 21, - "end": 31, + "end": 39, "ctxt": 0 }, - "tagName": "title", + "tagName": "foreignObject", "namespace": "http://www.w3.org/2000/svg", "attributes": [], "children": [ { - "type": "Text", + "type": "Element", "span": { - "start": 28, - "end": 31, + "start": 36, + "end": 39, "ctxt": 0 }, - "data": "abc", - "raw": "abc" + "tagName": "p", + "namespace": "http://www.w3.org/1999/xhtml", + "attributes": [], + "children": [], + "content": null, + "isSelfClosing": false } ], "content": null, diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/output.stderr b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/output.stderr index 2fea4bfd93a7..eda05e09da45 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/output.stderr +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/output.stderr @@ -1 +1 @@ -(1,30): expected-closing-tag-but-got-eof \ No newline at end of file +(1,38): expected-closing-tag-but-got-eof \ No newline at end of file diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/span.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/span.rust-debug index cd9a855e8009..f218de0f245a 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/span.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/49/span.rust-debug @@ -1,19 +1,19 @@ x Document ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/49/input.html:1:1] - 1 | abc - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + 1 |

+ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/49/input.html:1:1] - 1 | abc + 1 |

: ^^^^^^^^^^^^^^^ `---- x DocumentType ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/49/input.html:1:1] - 1 | abc + 1 |

: ^^^^^^^^^^^^^^^ `---- @@ -23,36 +23,36 @@ x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/49/input.html:1:1] - 1 | abc - : ^^^^^^^^^^^^^^^ + 1 |

+ : ^^^^^^^^^^^^^^^^^^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/49/input.html:1:1] - 1 | abc - : ^^^^^^^^^^^^^^^ + 1 |

+ : ^^^^^^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/49/input.html:1:1] - 1 | abc - : ^^^^^^^^^^ + 1 |

+ : ^^^^^^^^^^^^^^^^^^ `---- x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/49/input.html:1:1] - 1 | abc - : ^^^^^^^^^^ + 1 |

+ : ^^^^^^^^^^^^^^^^^^ `---- x Child ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/49/input.html:1:1] - 1 | abc - : ^^^ + 1 |

+ : ^^^ `---- - x Text + x Element ,-[$DIR/tests/html5lib-tests-fixture/tests20_dat/49/input.html:1:1] - 1 | abc - : ^^^ + 1 |

+ : ^^^ `---- diff --git a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/50/dom.rust-debug b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/50/dom.rust-debug index 8f363d5d3bbd..3ec0aed348df 100644 --- a/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/50/dom.rust-debug +++ b/crates/swc_html_parser/tests/html5lib-tests-fixture/tests20_dat/50/dom.rust-debug @@ -1,6 +1,7 @@ +| | | | -|