mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
- HTMLtree.c: when in a pre element no formatting space should
be added. - test/HTML/pre.html result/HTML/pre.html*: added a regression test Daniel
This commit is contained in:
parent
068a965ccd
commit
f0c5376a03
@ -1,3 +1,9 @@
|
||||
Thu Jun 7 18:06:34 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* HTMLtree.c: when in a pre element no formatting space should
|
||||
be added.
|
||||
* test/HTML/pre.html result/HTML/pre.html*: added a regression test
|
||||
|
||||
Thu Jun 7 17:29:38 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* configure.in: added tests for signal() and signal.h
|
||||
|
10
HTMLtree.c
10
HTMLtree.c
@ -1017,12 +1017,14 @@ htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
if (cur->children != NULL) {
|
||||
if ((cur->children->type != HTML_TEXT_NODE) &&
|
||||
(cur->children->type != HTML_ENTITY_REF_NODE) &&
|
||||
(cur->children != cur->last))
|
||||
(cur->children != cur->last) &&
|
||||
(!xmlStrEqual(cur->name, BAD_CAST "pre")))
|
||||
xmlOutputBufferWriteString(buf, "\n");
|
||||
htmlNodeListDumpOutput(buf, doc, cur->children, encoding);
|
||||
if ((cur->last->type != HTML_TEXT_NODE) &&
|
||||
(cur->last->type != HTML_ENTITY_REF_NODE) &&
|
||||
(cur->children != cur->last))
|
||||
(cur->children != cur->last) &&
|
||||
(!xmlStrEqual(cur->name, BAD_CAST "pre")))
|
||||
xmlOutputBufferWriteString(buf, "\n");
|
||||
}
|
||||
xmlOutputBufferWriteString(buf, "</");
|
||||
@ -1030,7 +1032,9 @@ htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
xmlOutputBufferWriteString(buf, ">");
|
||||
if (cur->next != NULL) {
|
||||
if ((cur->next->type != HTML_TEXT_NODE) &&
|
||||
(cur->next->type != HTML_ENTITY_REF_NODE))
|
||||
(cur->next->type != HTML_ENTITY_REF_NODE) &&
|
||||
(cur->parent != NULL) &&
|
||||
(!xmlStrEqual(cur->parent->name, BAD_CAST "pre")))
|
||||
xmlOutputBufferWriteString(buf, "\n");
|
||||
}
|
||||
}
|
||||
|
2
result/HTML/pre.html
Normal file
2
result/HTML/pre.html
Normal file
@ -0,0 +1,2 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html><body><pre><a href="toto"></a><img src="titi"></pre></body></html>
|
0
result/HTML/pre.html.err
Normal file
0
result/HTML/pre.html.err
Normal file
23
result/HTML/pre.html.sax
Normal file
23
result/HTML/pre.html.sax
Normal file
@ -0,0 +1,23 @@
|
||||
SAX.setDocumentLocator()
|
||||
SAX.startDocument()
|
||||
SAX.startElement(html)
|
||||
SAX.ignorableWhitespace(
|
||||
, 1)
|
||||
SAX.startElement(body)
|
||||
SAX.ignorableWhitespace(
|
||||
, 1)
|
||||
SAX.startElement(pre)
|
||||
SAX.startElement(a, href='toto')
|
||||
SAX.endElement(a)
|
||||
SAX.startElement(img, src='titi')
|
||||
SAX.endElement(img)
|
||||
SAX.endElement(pre)
|
||||
SAX.ignorableWhitespace(
|
||||
, 1)
|
||||
SAX.endElement(body)
|
||||
SAX.ignorableWhitespace(
|
||||
, 1)
|
||||
SAX.endElement(html)
|
||||
SAX.ignorableWhitespace(
|
||||
, 1)
|
||||
SAX.endDocument()
|
5
test/HTML/pre.html
Normal file
5
test/HTML/pre.html
Normal file
@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre><a href="toto"></a><img src="titi"></pre>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user