summaryrefslogtreecommitdiff
path: root/xmlwriter.c
diff options
context:
space:
mode:
Diffstat (limited to 'xmlwriter.c')
-rw-r--r--xmlwriter.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xmlwriter.c b/xmlwriter.c
index 37b7945..43934b3 100644
--- a/xmlwriter.c
+++ b/xmlwriter.c
@@ -2442,6 +2442,13 @@ xmlTextWriterEndPI(xmlTextWriterPtr writer)
return -1;
}
+ if (writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
xmlListPopFront(writer->nodes);
return sum;
}