diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go b/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go index 35a46fc72..c896d5844 100644 --- a/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go +++ b/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go @@ -176,10 +176,23 @@ func (p *printer) output(n interface{}) []byte { // Always write a newline to separate us from the next item buf.WriteByte(newline) - // If the next item is an object that is exactly one line, - // then we don't output another newline. + // Need to determine if we're going to separate the next item + // with a blank line. The logic here is simple, though there + // are a few conditions: + // + // 1. The next object is more than one line away anyways, + // so we need an empty line. + // + // 2. The next object is not a "single line" object, so + // we need an empty line. + // + // 3. This current object is not a single line object, + // so we need an empty line. + current := t.Items[index] next := t.Items[index+1] - if next.Pos().Line != t.Items[index].Pos().Line+1 || !p.isSingleLineObject(next) { + if next.Pos().Line != t.Items[index].Pos().Line+1 || + !p.isSingleLineObject(next) || + !p.isSingleLineObject(current) { buf.WriteByte(newline) } } diff --git a/vendor/vendor.json b/vendor/vendor.json index 58d26ade0..232335453 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1711,68 +1711,68 @@ { "checksumSHA1": "Ok3Csn6Voou7pQT6Dv2mkwpqFtw=", "path": "github.com/hashicorp/hcl", - "revision": "372e8ddaa16fd67e371e9323807d056b799360af", - "revisionTime": "2017-02-02T00:05:34Z" + "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", + "revisionTime": "2017-02-17T16:47:38Z" }, { "checksumSHA1": "XQmjDva9JCGGkIecOgwtBEMCJhU=", "path": "github.com/hashicorp/hcl/hcl/ast", - "revision": "372e8ddaa16fd67e371e9323807d056b799360af", - "revisionTime": "2017-02-02T00:05:34Z" + "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", + "revisionTime": "2017-02-17T16:47:38Z" }, { "checksumSHA1": "DaQmLi48oUAwctWcX6A6DNN61UY=", "path": "github.com/hashicorp/hcl/hcl/fmtcmd", - "revision": "372e8ddaa16fd67e371e9323807d056b799360af", - "revisionTime": "2017-02-02T00:05:34Z" + "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", + "revisionTime": "2017-02-17T16:47:38Z" }, { "checksumSHA1": "MGYzZActhzSs9AnCx3wrEYVbKFg=", "path": "github.com/hashicorp/hcl/hcl/parser", - "revision": "372e8ddaa16fd67e371e9323807d056b799360af", - "revisionTime": "2017-02-02T00:05:34Z" + "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", + "revisionTime": "2017-02-17T16:47:38Z" }, { - "checksumSHA1": "/cGXzX8tBvN1mu0mNvGzURdiqHU=", + "checksumSHA1": "gKCHLG3j2CNs2iADkvSKSNkni+8=", "path": "github.com/hashicorp/hcl/hcl/printer", - "revision": "372e8ddaa16fd67e371e9323807d056b799360af", - "revisionTime": "2017-02-02T00:05:34Z" + "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", + "revisionTime": "2017-02-17T16:47:38Z" }, { "checksumSHA1": "z6wdP4mRw4GVjShkNHDaOWkbxS0=", "path": "github.com/hashicorp/hcl/hcl/scanner", - "revision": "372e8ddaa16fd67e371e9323807d056b799360af", - "revisionTime": "2017-02-02T00:05:34Z" + "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", + "revisionTime": "2017-02-17T16:47:38Z" }, { "checksumSHA1": "oS3SCN9Wd6D8/LG0Yx1fu84a7gI=", "path": "github.com/hashicorp/hcl/hcl/strconv", - "revision": "372e8ddaa16fd67e371e9323807d056b799360af", - "revisionTime": "2017-02-02T00:05:34Z" + "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", + "revisionTime": "2017-02-17T16:47:38Z" }, { "checksumSHA1": "c6yprzj06ASwCo18TtbbNNBHljA=", "path": "github.com/hashicorp/hcl/hcl/token", - "revision": "372e8ddaa16fd67e371e9323807d056b799360af", - "revisionTime": "2017-02-02T00:05:34Z" + "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", + "revisionTime": "2017-02-17T16:47:38Z" }, { "checksumSHA1": "138aCV5n8n7tkGYMsMVQQnnLq+0=", "path": "github.com/hashicorp/hcl/json/parser", - "revision": "372e8ddaa16fd67e371e9323807d056b799360af", - "revisionTime": "2017-02-02T00:05:34Z" + "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", + "revisionTime": "2017-02-17T16:47:38Z" }, { "checksumSHA1": "YdvFsNOMSWMLnY6fcliWQa0O5Fw=", "path": "github.com/hashicorp/hcl/json/scanner", - "revision": "372e8ddaa16fd67e371e9323807d056b799360af", - "revisionTime": "2017-02-02T00:05:34Z" + "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", + "revisionTime": "2017-02-17T16:47:38Z" }, { "checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=", "path": "github.com/hashicorp/hcl/json/token", - "revision": "372e8ddaa16fd67e371e9323807d056b799360af", - "revisionTime": "2017-02-02T00:05:34Z" + "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", + "revisionTime": "2017-02-17T16:47:38Z" }, { "checksumSHA1": "2Nrl/YKrmowkRgCDLhA6UTFgYEY=",