diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-13 12:41:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-13 12:41:56 +0200 |
commit | ad1a0d713e1bc10022c170d3b1b8648d4182edac (patch) | |
tree | 9b47f02091ca25ff2d83125c9910dc1bf85c8910 | |
parent | bf6b63d2a72d37bee0248e5a2c39d933454d617a (diff) |
Fix indentation issue with immediately-closed tags
-rw-r--r-- | genx.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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 |