Fixing lexborisov/myhtml/issues/187

Fixing lost `MyHTML_TOKEN_TYPE_DONE` flag for invalid tag `<br>`
This commit is contained in:
Kirill Zhumarin 2021-06-26 18:47:52 +03:00 committed by GitHub
parent 81d5ed7afd
commit 4dc5162e76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1135,7 +1135,11 @@ bool myhtml_insertion_mode_in_body(myhtml_tree_t* tree, myhtml_token_node_t* tok
myhtml_tree_active_formatting_reconstruction(tree);
token->type = MyHTML_TOKEN_TYPE_OPEN;
if (token->type & MyHTML_TOKEN_TYPE_DONE) {
token->type = MyHTML_TOKEN_TYPE_OPEN | MyHTML_TOKEN_TYPE_DONE;
} else {
token->type = MyHTML_TOKEN_TYPE_OPEN;
}
myhtml_tree_node_insert_html_element(tree, token);
myhtml_tree_open_elements_pop(tree);