issue 53: do not emit empty line for empty collections
diff --git a/src/main/java/org/yaml/snakeyaml/emitter/Emitter.java b/src/main/java/org/yaml/snakeyaml/emitter/Emitter.java
index f2ba11e..714cbfe 100644
--- a/src/main/java/org/yaml/snakeyaml/emitter/Emitter.java
+++ b/src/main/java/org/yaml/snakeyaml/emitter/Emitter.java
@@ -439,9 +439,6 @@
indent = indents.pop();
flowLevel--;
writeIndicator("]", false, false, false);
- if (prettyFlow) {
- writeIndent();
- }
state = states.pop();
} else {
if (canonical || column > bestWidth || prettyFlow) {
@@ -495,9 +492,6 @@
if (event instanceof MappingEndEvent) {
indent = indents.pop();
flowLevel--;
- if (prettyFlow) {
- writeIndent();
- }
writeIndicator("}", false, false, false);
state = states.pop();
} else {
diff --git a/src/test/resources/recursive/no-children-1-pretty.yaml b/src/test/resources/recursive/no-children-1-pretty.yaml
index 89e9c1c..1dfac19 100644
--- a/src/test/resources/recursive/no-children-1-pretty.yaml
+++ b/src/test/resources/recursive/no-children-1-pretty.yaml
@@ -3,8 +3,7 @@
birthPlace: Leningrad,
birthday: !!timestamp '1970-01-12T13:46:40Z',
children: !!set {
-
- },
+ },
father: null,
mother: null,
name: Father,
@@ -13,8 +12,7 @@
birthPlace: Saint-Petersburg,
birthday: !!timestamp '1973-03-03T09:46:40Z',
children: !!set {
-
- },
+ },
father: null,
mother: null,
name: Mother,
diff --git a/src/test/resources/recursive/with-children-pretty.yaml b/src/test/resources/recursive/with-children-pretty.yaml
index 0089c4f..a18509e 100644
--- a/src/test/resources/recursive/with-children-pretty.yaml
+++ b/src/test/resources/recursive/with-children-pretty.yaml
@@ -10,8 +10,7 @@
birthPlace: New York,
birthday: !!timestamp '1983-04-24T02:40:00Z',
children: !!set {
-
- },
+ },
father: *id001,
mother: &id004 {
bankAccountOwner: *id001,
@@ -36,8 +35,7 @@
birthPlace: Munich,
birthday: !!timestamp '1979-10-28T23:06:40Z',
children: !!set {
-
- },
+ },
father: *id001,
mother: *id004,
name: Son,