[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102593: Return CDATA sections (like
From: |
Lars Magne Ingebrigtsen |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102593: Return CDATA sections (like <style>foo</style>) as text nodes. |
Date: |
Mon, 06 Dec 2010 17:59:52 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102593
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Mon 2010-12-06 17:59:52 +0100
message:
Return CDATA sections (like <style>foo</style>) as text nodes.
Also ignore blank HTML nodes.
modified:
src/ChangeLog
src/xml.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-12-06 16:37:26 +0000
+++ b/src/ChangeLog 2010-12-06 16:59:52 +0000
@@ -1,3 +1,9 @@
+2010-12-06 Lars Magne Ingebrigtsen <address@hidden>
+
+ * xml.c (parse_region): Ignore blank HTML nodes.
+ (make_dom): Return CDATA sections (like <style>foo</style>) as
+ text nodes.
+
2010-12-06 Stefan Monnier <address@hidden>
* lread.c (read1): Allow newstyle unquote outside of backquote.
=== modified file 'src/xml.c'
--- a/src/xml.c 2010-10-02 00:39:15 +0000
+++ b/src/xml.c 2010-12-06 16:59:52 +0000
@@ -62,7 +62,7 @@
return Fnreverse (result);
}
- else if (node->type == XML_TEXT_NODE)
+ else if (node->type == XML_TEXT_NODE || node->type == XML_CDATA_SECTION_NODE)
{
if (node->content)
return build_string (node->content);
@@ -105,7 +105,8 @@
doc = htmlReadMemory (BYTE_POS_ADDR (CHAR_TO_BYTE (istart)),
bytes, burl, "utf-8",
HTML_PARSE_RECOVER|HTML_PARSE_NONET|
- HTML_PARSE_NOWARNING|HTML_PARSE_NOERROR);
+ HTML_PARSE_NOWARNING|HTML_PARSE_NOERROR|
+ HTML_PARSE_NOBLANKS);
else
doc = xmlReadMemory (BYTE_POS_ADDR (CHAR_TO_BYTE (istart)),
bytes, burl, "utf-8",
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102593: Return CDATA sections (like <style>foo</style>) as text nodes.,
Lars Magne Ingebrigtsen <=