Merge pull request #47 from Azq2/patch-4

Add missing MyHTML_TOKEN_TYPE_DONE
This commit is contained in:
Alexander 2018-05-15 02:55:31 +03:00 committed by GitHub
commit e15a4e5dd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -626,6 +626,8 @@ mycore_string_t * myhtml_node_text_set(myhtml_tree_node_t *node, const char* tex
if(node->token == NULL) if(node->token == NULL)
return NULL; return NULL;
node->token->type |= MyHTML_TOKEN_TYPE_DONE;
} }
if(node->token->str.data == NULL) { if(node->token->str.data == NULL) {
@ -668,6 +670,8 @@ mycore_string_t * myhtml_node_text_set_with_charef(myhtml_tree_node_t *node, con
if(node->token == NULL) if(node->token == NULL)
return NULL; return NULL;
node->token->type |= MyHTML_TOKEN_TYPE_DONE;
} }
if(node->token->str.data == NULL) { if(node->token->str.data == NULL) {
@ -1389,6 +1393,8 @@ myhtml_tree_attr_t * myhtml_attribute_add(myhtml_tree_node_t *node, const char *
if(node->token == NULL) if(node->token == NULL)
return NULL; return NULL;
node->token->type |= MyHTML_TOKEN_TYPE_DONE;
} }
return myhtml_token_node_attr_append_with_convert_encoding(tree->token, node->token, key, key_len, return myhtml_token_node_attr_append_with_convert_encoding(tree->token, node->token, key, key_len,