Skip to content

Commit

Permalink
fix: Properly handle end tags in table body
Browse files Browse the repository at this point in the history
  • Loading branch information
fb55 committed Jan 7, 2022
1 parent 347206c commit a0aff95
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/parse5/lib/parser/index.ts
Expand Up @@ -3069,8 +3069,14 @@ function endTagInTableBody<T extends TreeAdapterTypeMap>(p: Parser<T>, token: Ta
p._processToken(token);
}
} else if (
(tn !== $.BODY && tn !== $.CAPTION && tn !== $.COL && tn !== $.COLGROUP) ||
(tn !== $.HTML && tn !== $.TD && tn !== $.TH && tn !== $.TR)
tn !== $.BODY &&
tn !== $.CAPTION &&
tn !== $.COL &&
tn !== $.COLGROUP &&
tn !== $.HTML &&
tn !== $.TD &&
tn !== $.TH &&
tn !== $.TR
) {
endTagInTable(p, token);
}
Expand Down

0 comments on commit a0aff95

Please sign in to comment.