diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-13 12:40:34 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-13 12:40:34 +0200 |
commit | 29aff5bf19aa23c784bb09b74dc388ccb5f495e2 (patch) | |
tree | 9b21acae1022c531294934821b6b228d49c68cfd /cutl/details/genx | |
parent | 401aa32832a916f309dbed8252e06506e89fd1d3 (diff) |
Fix indentation issue with immediately-closed tags
Diffstat (limited to 'cutl/details/genx')
-rw-r--r-- | cutl/details/genx/genx.c | 12 |
1 files changed, 8 insertions, 4 deletions
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, "</"); @@ -1799,6 +1800,9 @@ genxStatus genxEndElement(genxWriter w) 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 |