From 29aff5bf19aa23c784bb09b74dc388ccb5f495e2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 13 Mar 2013 12:40:34 +0200 Subject: Fix indentation issue with immediately-closed tags --- cutl/details/genx/genx.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'cutl/details/genx/genx.c') diff --git a/cutl/details/genx/genx.c b/cutl/details/genx/genx.c index 659d629..6ad55f0 100644 --- a/cutl/details/genx/genx.c +++ b/cutl/details/genx/genx.c @@ -1294,8 +1294,11 @@ static genxStatus writeStartTag(genxWriter w, Boolean close) if (writeIndentation (w) != GENX_SUCCESS) return w->status; - w->ppDepth++; - w->ppSimple = True; + if (!close) + { + w->ppDepth++; + w->ppSimple = True; + } } SendCheck(w, "<"); @@ -1785,8 +1788,6 @@ genxStatus genxEndElement(genxWriter w) if (!w->ppSimple) if (writeIndentation (w) != GENX_SUCCESS) return w->status; - - w->ppSimple = False; } SendCheck(w, ""); } + if (w->ppIndent) + w->ppSimple = False; + /* * pop zero or more namespace declarations, then a null, then the * start-element declaration off the stack -- cgit v1.1