Add Encoder opt to emit arrays on multiple lines (#203)

A new Encoder option emits arrays with more than one line on multiple lines.
This is off by default and toggled with `ArraysWithOneElementPerLine`.

For example:

```
A = [1,2,3]
```

Becomes:

```
A = [
  1,
  2,
  3
]
```

Fixes #200
This commit is contained in:
Thomas Pelletier
2017-12-18 14:57:16 +01:00
committed by GitHub
parent 4e9e0ee19b
commit b8b5e76965
4 changed files with 128 additions and 14 deletions
+1 -1
View File
@@ -652,7 +652,7 @@ func TestTomlValueStringRepresentation(t *testing.T) {
"[\"gamma\",\"delta\"]"},
{nil, ""},
} {
result, err := tomlValueStringRepresentation(item.Value)
result, err := tomlValueStringRepresentation(item.Value, "", false)
if err != nil {
t.Errorf("Test %d - unexpected error: %s", idx, err)
}