Skip to content
Snippets Groups Projects
Commit 25c15676f313 authored by Laurence Rowe's avatar Laurence Rowe
Browse files

Output should not include extraneous newlines when indent is off

Hence matching behaviour of xmlSaveOption XML_SAVE_FORMAT off.
This affects only one of the regression tests
parent 8dd0b61f523c
No related branches found
No related tags found
No related merge requests found
......@@ -1587,5 +1587,5 @@
while (child != NULL) {
xmlNodeDumpOutput(buf, result, child, 0, (indent == 1),
(const char *) encoding);
if ((child->type == XML_DTD_NODE) ||
if (indent && ((child->type == XML_DTD_NODE) ||
((child->type == XML_COMMENT_NODE) &&
......@@ -1591,5 +1591,5 @@
((child->type == XML_COMMENT_NODE) &&
(child->next != NULL)))
(child->next != NULL))))
xmlOutputBufferWriteString(buf, "\n");
child = child->next;
}
......@@ -1593,6 +1593,7 @@
xmlOutputBufferWriteString(buf, "\n");
child = child->next;
}
if (indent)
xmlOutputBufferWriteString(buf, "\n");
}
xmlOutputBufferFlush(buf);
......
<root/>
......@@ -180,6 +180,7 @@
bug-170.out bug-170.xsl \
bug-171.out bug-171.xsl \
bug-172.out bug-172.xsl \
bug-173.out bug-173.xsl \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \
......
<!--Comment--><root/>
\ No newline at end of file
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="no" omit-xml-declaration="yes"/>
<xsl:template match="/">
<!-- Output should not include extraneous newlines when indent is off -->
<xsl:comment>Comment</xsl:comment>
<root/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
......@@ -4,4 +4,4 @@
<month>December</month>
<month>December</month>
<month/>
</dates>
</dates>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment