fix doctype serialization

whitespace after <!DOCTYPE required by spec
This commit is contained in:
Кирилл Жумарин 2018-06-02 10:05:23 +03:00 committed by GitHub
parent d41f529335
commit 2d8e6a3444
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,13 +137,13 @@ mystatus_t myhtml_serialization_node_callback(myhtml_tree_node_t* node, mycore_c
if(callback("<!DOCTYPE", 9, ptr)) if(callback("<!DOCTYPE", 9, ptr))
return MyCORE_STATUS_ERROR_MEMORY_ALLOCATION; return MyCORE_STATUS_ERROR_MEMORY_ALLOCATION;
if(callback(" ", 1, ptr))
return MyCORE_STATUS_ERROR_MEMORY_ALLOCATION;
if(node->token) { if(node->token) {
myhtml_tree_attr_t* attr = node->token->attr_first; myhtml_tree_attr_t* attr = node->token->attr_first;
if(attr && attr->key.data && attr->key.length) { if(attr && attr->key.data && attr->key.length) {
if(callback(" ", 1, ptr))
return MyCORE_STATUS_ERROR_MEMORY_ALLOCATION;
if(callback(attr->key.data, attr->key.length, ptr)) if(callback(attr->key.data, attr->key.length, ptr))
return MyCORE_STATUS_ERROR_MEMORY_ALLOCATION; return MyCORE_STATUS_ERROR_MEMORY_ALLOCATION;
} }