summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Faivre <contact@jeremyfa.com>2019-09-17 00:36:33 +0200
committerJeremy Faivre <contact@jeremyfa.com>2019-09-17 00:36:33 +0200
commit0bbb7075908e5aead75170e5e8b8c9f6e326e6f0 (patch)
tree42bb5f469d0cd740acc013804a3c6047695dd829
parentd2662e9a95e486d30bb8b97422d53c79c2c3e15b (diff)
downloadyamljs-0bbb7075908e5aead75170e5e8b8c9f6e326e6f0.tar.gz
Revert "Remove newlines before objects in arrays"
This reverts commit 3cbcddc35b3b0392db5b2b2962849177a7a3b254. This commit was breaking most tests and should not have been merged
-rw-r--r--src/Dumper.coffee3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Dumper.coffee b/src/Dumper.coffee
index a6cec8e..a1e75e6 100644
--- a/src/Dumper.coffee
+++ b/src/Dumper.coffee
@@ -38,7 +38,8 @@ class Dumper
output +=
prefix +
- '- ' +
+ '-' +
+ (if willBeInlined then ' ' else "\n") +
@dump(value, inline - 1, (if willBeInlined then 0 else indent + @indentation), exceptionOnInvalidType, objectEncoder) +
(if willBeInlined then "\n" else '')