emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: html-parse-string: Ignores the content of SCRIPT tag and the COMMENT


From: Lars Magne Ingebrigtsen
Subject: Re: html-parse-string: Ignores the content of SCRIPT tag and the COMMENT tag
Date: Wed, 20 Jul 2011 22:03:40 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

Chong Yidong <address@hidden> writes:

> Hamano Kiyoto's copyright assignment is now complete; if the patch is
> good, could you apply it?  Thanks.

The patch was from September, and some of the stuff it was doing (the
CDATA stuff) was fixed by somebody in December.

The <-- > stuff wasn't, though, so I adapted that idea and made it
return the comments.

But I'm applying this bit:

>    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));
 
-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]