mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-08 17:42:14 +03:00
Trying another better solution at the <a> </a> problem, Daniel
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
Thu Mar 2 04:45:15 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||||
|
|
||||||
|
* parser.c: seems a better solution to <a> </a> exists,
|
||||||
|
will try it for a while
|
||||||
|
|
||||||
Thu Mar 2 02:26:13 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
Thu Mar 2 02:26:13 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||||
|
|
||||||
* parser.c: tried to remove the <a> </a> generating <a/>
|
* parser.c: tried to remove the <a> </a> generating <a/>
|
||||||
|
10
parser.c
10
parser.c
@@ -2101,15 +2101,17 @@ static int areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
|
|||||||
return(0);
|
return(0);
|
||||||
if (CUR != '<') return(0);
|
if (CUR != '<') return(0);
|
||||||
if (ctxt->node == NULL) return(0);
|
if (ctxt->node == NULL) return(0);
|
||||||
|
if ((ctxt->node->childs == NULL) &&
|
||||||
|
(CUR == '<') && (NXT(1) == '/')) return(0);
|
||||||
|
|
||||||
lastChild = xmlGetLastChild(ctxt->node);
|
lastChild = xmlGetLastChild(ctxt->node);
|
||||||
if (lastChild == NULL) {
|
if (lastChild == NULL) {
|
||||||
if (ctxt->node->content != NULL) return(0);
|
if (ctxt->node->content != NULL) return(0);
|
||||||
} else if (xmlNodeIsText(lastChild))
|
} else if (xmlNodeIsText(lastChild))
|
||||||
return(0);
|
return(0);
|
||||||
else if ((ctxt->node->childs != NULL) &&
|
else if ((ctxt->node->childs != NULL) &&
|
||||||
(xmlNodeIsText(ctxt->node->childs)))
|
(xmlNodeIsText(ctxt->node->childs)))
|
||||||
return(0);
|
return(0);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user