Skip to content

Commit 3b2258b

Browse files
test(html): drive the second table group's kept start tag
1 parent 1a0980e commit 3b2258b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎test/HtmlSyntax.unittest.js‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4848,7 +4848,13 @@ describe("SourceProcessor — the per-transform switches", () => {
48484848
"<table><tbody><tr><td>a</td></tr></tbody></table>",
48494849
"<table><tr><td>a</table>"
48504850
],
4851-
["<table><colgroup><col></colgroup></table>", "<table><col></table>"]
4851+
["<table><colgroup><col></colgroup></table>", "<table><col></table>"],
4852+
// §4.13: the second group's start tag has to stay once the first has lost
4853+
// its end tag, or its columns would join the group before it.
4854+
[
4855+
"<table><colgroup><col></colgroup><col></table>",
4856+
"<table><col><colgroup><col></table>"
4857+
]
48524858
])("keeps a parser-inserted table group balanced: %s", (doc, on) => {
48534859
expect(new SourceProcessor().process(doc, { mode: "minify" }).code).toBe(
48544860
on

0 commit comments

Comments
 (0)