oops - state must be popped before writing indent
otherwise the closing } on non-empty objects is incorrectly indented
This commit is contained in:
parent
5d9108c469
commit
5bf3b20542
@ -521,12 +521,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void endObject() {
|
void endObject() {
|
||||||
if (currentState() == ObjectElement) {
|
bool isNotEmpty = currentState() == ObjectElement;
|
||||||
|
popState(Object);
|
||||||
|
if (isNotEmpty) {
|
||||||
if (m_pretty)
|
if (m_pretty)
|
||||||
write('\n');
|
write('\n');
|
||||||
indent();
|
indent();
|
||||||
}
|
}
|
||||||
popState(Object);
|
|
||||||
write('}');
|
write('}');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user