summaryrefslogtreecommitdiff
path: root/xmlwriter.c
diff options
context:
space:
mode:
Diffstat (limited to 'xmlwriter.c')
-rw-r--r--xmlwriter.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmlwriter.c b/xmlwriter.c
index 69d4b85..b88de3a 100644
--- a/xmlwriter.c
+++ b/xmlwriter.c
@@ -1240,8 +1240,16 @@ xmlTextWriterFullEndElement(xmlTextWriterPtr writer)
if (count < 0)
return -1;
sum += count;
+ if (writer->indent)
+ writer->doindent = 0;
/* fallthrough */
case XML_TEXTWRITER_TEXT:
+ if ((writer->indent) && (writer->doindent)) {
+ count = xmlTextWriterWriteIndent(writer);
+ sum += count;
+ writer->doindent = 1;
+ } else
+ writer->doindent = 1;
count = xmlOutputBufferWriteString(writer->out, "</");
if (count < 0)
return -1;