summaryrefslogtreecommitdiff
path: root/xmlsave.c
diff options
context:
space:
mode:
Diffstat (limited to 'xmlsave.c')
-rw-r--r--xmlsave.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmlsave.c b/xmlsave.c
index 6963e7b..231ee7b 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -623,7 +623,9 @@ xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
buf = ctxt->buf;
while (cur != NULL) {
if ((ctxt->format) && (xmlIndentTreeOutput) &&
- (cur->type == XML_ELEMENT_NODE))
+ ((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_COMMENT_NODE) ||
+ (cur->type == XML_PI_NODE)))
xmlOutputBufferWrite(buf, ctxt->indent_size *
(ctxt->level > ctxt->indent_nr ?
ctxt->indent_nr : ctxt->level),