Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
d0iasm committed Aug 30, 2024
1 parent d547a7f commit 6b422e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/src/renderer/html/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -546,14 +546,12 @@ impl HtmlParser {
// An end tag whose tag name is "body"
"body" => {
self.mode = InsertionMode::AfterBody;
let element_kind = ElementKind::from_str(tag)
.expect("failed to convert string to ElementKind");
token = self.t.next();
if !self.contain_in_stack(ElementKind::Body) {
// Parse error. Ignore the token.
continue;
}
self.pop_until(element_kind);
self.pop_until(ElementKind::Body);
continue;
}
// An end tag whose tag name is "html"
Expand Down

0 comments on commit 6b422e6

Please sign in to comment.