hcl/hcl/printer
Florian Forster b07f6fa7a2 printer: Simplify the formatting of single-line lists.
This change splits out the formatting of simple single-line lists. A list
is considered "simple" if all of its elements are on one line, all
elements are literals (except heredoc) and there are no line comments.
As an exception, a heredoc string is allowed when it is the only element
in the list.

This fixes an issue with a single-line list with one element and a line
comment. The formatter used to pull the closing bracket on the same line
(after the comment), causing parse errors.
2018-04-04 19:34:59 +02:00
..
testdata printer: Simplify the formatting of single-line lists. 2018-04-04 19:34:59 +02:00
nodes.go printer: Simplify the formatting of single-line lists. 2018-04-04 19:34:59 +02:00
printer_test.go printer: Add another input breaking TestFormatValidOutput(). 2018-04-04 19:34:59 +02:00
printer.go No longer preserve CRLF line endings 2016-12-01 12:09:33 -05:00