mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[br] Shorter code
This commit is contained in:
parent
5fbfacbab6
commit
79bfb0bc4a
@ -54,7 +54,7 @@ dump_dom_element_closing(struct string *buf, dom_node *node)
|
||||
|
||||
/* Get string data and print element name */
|
||||
|
||||
if (dom_string_byte_length(node_name) != 2 || strcmp(dom_string_data(node_name), "BR")) {
|
||||
if (strcmp(dom_string_data(node_name), "BR")) {
|
||||
add_to_string(buf, "</");
|
||||
add_bytes_to_string(buf, dom_string_data(node_name), dom_string_byte_length(node_name));
|
||||
add_char_to_string(buf, '>');
|
||||
@ -161,7 +161,7 @@ dump_dom_element(void *mapa, void *mapa_rev, struct string *buf, dom_node *node,
|
||||
/* Get string data and print element name */
|
||||
add_bytes_to_string(buf, dom_string_data(node_name), dom_string_byte_length(node_name));
|
||||
|
||||
if (dom_string_byte_length(node_name) == 2 && strcmp(dom_string_data(node_name), "BR") == 0) {
|
||||
if (strcmp(dom_string_data(node_name), "BR") == 0) {
|
||||
add_char_to_string(buf, '/');
|
||||
}
|
||||
exc = dom_node_get_attributes(node, &attrs);
|
||||
|
Loading…
Reference in New Issue
Block a user