Skip to content

Commit

Permalink
Merge pull request #563 from dylanstreb/issue-562-tfoot
Browse files Browse the repository at this point in the history
Add tfoot to appropriate fields in IsParentExplicitEnd
  • Loading branch information
JonathanMagnan authored Aug 14, 2024
2 parents 9ead5db + f208514 commit d108aac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/HtmlAgilityPack.Shared/HtmlDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1956,19 +1956,19 @@ private bool IsParentExplicitEnd()
isExplicitEnd = nodeName == "table";
break;
case "tr":
isExplicitEnd = nodeName == "tr" || nodeName == "tbody";
isExplicitEnd = nodeName == "tr" || nodeName == "thead" || nodeName == "tbody" || nodeName == "tfoot";
break;
case "thead":
isExplicitEnd = nodeName == "tbody";
isExplicitEnd = nodeName == "tbody" || nodeName == "tfoot";
break;
case "tbody":
isExplicitEnd = nodeName == "tbody";
isExplicitEnd = nodeName == "tbody" || nodeName == "tfoot";
break;
case "td":
isExplicitEnd = nodeName == "td" || nodeName == "th" || nodeName == "tr" || nodeName == "tbody";
isExplicitEnd = nodeName == "td" || nodeName == "th" || nodeName == "tr" || nodeName == "tbody" || nodeName == "tfoot";
break;
case "th":
isExplicitEnd = nodeName == "td" || nodeName == "th" || nodeName == "tr" || nodeName == "tbody";
isExplicitEnd = nodeName == "td" || nodeName == "th" || nodeName == "tr" || nodeName == "tbody" || nodeName == "tfoot";
break;
case "h1":
isExplicitEnd = nodeName == "h2" || nodeName == "h3" || nodeName == "h4" || nodeName == "h5";
Expand Down

0 comments on commit d108aac

Please sign in to comment.