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() {
|
||||
if (currentState() == ObjectElement) {
|
||||
bool isNotEmpty = currentState() == ObjectElement;
|
||||
popState(Object);
|
||||
if (isNotEmpty) {
|
||||
if (m_pretty)
|
||||
write('\n');
|
||||
indent();
|
||||
}
|
||||
popState(Object);
|
||||
write('}');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user