blob: 86698f640faecc6f334a56c24dea23fe037c2aeb [file] [log] [blame]
40 columns |
>>> empty list
[];
<<<
[];
>>> exactly 40 characters
[first, second, third, fourth, seventh];
<<<
[first, second, third, fourth, seventh];
>>>
[first, second, third, fourth, fifth, sixth];
<<<
[
first,
second,
third,
fourth,
fifth,
sixth
];
>>> splits outer lists even if they fit
[[first], [], [
second,[third], fourth] ];
<<<
[
[first],
[],
[
second,
[third],
fourth
]
];
>>> split indirect outer
[function([inner])];
<<<
[
function([inner])
];
>>> empty literal does not force outer split
[[], {}, () {}];
<<<
[[], {}, () {}];
>>> nested split list
[first, [second, third, fourth], fifth, [sixth, seventh, eighth, nine, tenth,
eleventh]];
<<<
[
first,
[second, third, fourth],
fifth,
[
sixth,
seventh,
eighth,
nine,
tenth,
eleventh
]
];
>>> force multi-line because of contained block
[first, () {"fn";},third,fourth];
<<<
[
first,
() {
"fn";
},
third,
fourth
];
>>> spaces between items
[1,2,3,4];
<<<
[1, 2, 3, 4];
>>> trailing comma forces split
[1 , ];
<<<
[
1,
];
>>> trailing comma multiline
[first, second, third, fourth, fifth, sixth , ];
<<<
[
first,
second,
third,
fourth,
fifth,
sixth,
];
>>> nested lists are forced to split
[[[[[argument, argument, argument, argument]]]]];
<<<
[
[
[
[
[
argument,
argument,
argument,
argument
]
]
]
]
];
>>> preserve newlines in lists containing a line comment
[
// yeah
a,b,c,
d,e,f,
];
<<<
[
// yeah
a, b, c,
d, e, f,
];
>>> wrap between elements even when newlines are preserved
[
// yes
longElement,longElement,longElement,longElement,
longElement,longElement,longElement,longElement,longElement,longElement,
];
<<<
[
// yes
longElement, longElement, longElement,
longElement,
longElement, longElement, longElement,
longElement, longElement, longElement,
];
>>> ignore line comment after the "]"
[
a,b,c,
d
] // comment
;
<<<
[a, b, c, d] // comment
;
>>> preserves one blank line between elements
[
element,
// comment
element,
element
];
<<<
[
element,
// comment
element,
element
];