mirror of
https://github.com/lexborisov/Modest
synced 2024-11-28 16:33:08 +03:00
sync myhtml lexborisov/myhtml/issues/139
This commit is contained in:
parent
05ce218c5f
commit
0e6700cf55
@ -58,6 +58,17 @@ mystatus_t myhtml_serialization_tree_callback(myhtml_tree_node_t* scope_node, my
|
|||||||
{
|
{
|
||||||
myhtml_tree_node_t* node = scope_node;
|
myhtml_tree_node_t* node = scope_node;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Document node it is a root node of tree, it is not a tag element.
|
||||||
|
|
||||||
|
For HTML, the root element will always be <HTML> tag.
|
||||||
|
It is always present in the HTML document and it always a root of HTML document.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if(scope_node && scope_node->tree && scope_node->tree->document == scope_node) {
|
||||||
|
node = scope_node->child;
|
||||||
|
}
|
||||||
|
|
||||||
while(node) {
|
while(node) {
|
||||||
if(myhtml_serialization_node_callback(node, callback, ptr))
|
if(myhtml_serialization_node_callback(node, callback, ptr))
|
||||||
return MyCORE_STATUS_ERROR_MEMORY_ALLOCATION;
|
return MyCORE_STATUS_ERROR_MEMORY_ALLOCATION;
|
||||||
@ -550,4 +561,3 @@ mystatus_t myhtml_serialization_node_buffer(myhtml_tree_node_t* node, mycore_str
|
|||||||
|
|
||||||
return myhtml_serialization_node_callback(node, myhtml_serialization_concatenate, str);
|
return myhtml_serialization_node_callback(node, myhtml_serialization_concatenate, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user