Commit 36881d16 authored by HAMANO Kiyoto's avatar HAMANO Kiyoto Committed by Lars Magne Ingebrigtsen
Browse files

* xml.c (parse_region): If a document contains only comments, return that, too.

parent 1e98674d
2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
* xml.c (parse_region): If a document contains only comments,
return that, too.
2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
* xml.c (make_dom): Return comments, too.
......
......@@ -125,9 +125,21 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html
if (doc != NULL)
{
node = xmlDocGetRootElement (doc);
if (node != NULL)
result = make_dom (node);
xmlNode *n = doc->children->next;
Lisp_Object r = Qnil;
while (n) {
if (r != Qnil)
result = Fcons (r, result);
r = make_dom (n);
n = n->next;
}
if (result == Qnil)
result = r;
else
result = Fnreverse (Fcons (r, result));
xmlFreeDoc (doc);
xmlCleanupParser ();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment