Fix double array indentation inside parens
This commit is contained in:
parent
e79ba9f0c8
commit
e0549070a1
|
@ -629,6 +629,10 @@ private:
|
||||||
}
|
}
|
||||||
else if (arrayInitializerStart && isMultilineAt(index - 1))
|
else if (arrayInitializerStart && isMultilineAt(index - 1))
|
||||||
{
|
{
|
||||||
|
if (peekBack2Is(tok!"(")) {
|
||||||
|
indents.pop();
|
||||||
|
}
|
||||||
|
|
||||||
// Use the close bracket as the indent token to distinguish
|
// Use the close bracket as the indent token to distinguish
|
||||||
// the array initialiazer from an array index in the newline
|
// the array initialiazer from an array index in the newline
|
||||||
// handling code
|
// handling code
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
unittest
|
unittest
|
||||||
{
|
{
|
||||||
foo([
|
foo([
|
||||||
target.value.region[1], target.value.region[1],
|
target.value.region[1], target.value.region[1], target.value.region[1],
|
||||||
target.value.region[1], target.value.region[1], target.value.region[1]
|
target.value.region[1], target.value.region[1]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@ unittest
|
||||||
]),
|
]),
|
||||||
"short": Bson(["a": "b", "c": "d"]),
|
"short": Bson(["a": "b", "c": "d"]),
|
||||||
"numbers": Bson([
|
"numbers": Bson([
|
||||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2,
|
||||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0
|
3, 4, 5, 6, 7, 8, 9, 0
|
||||||
]),
|
]),
|
||||||
"shuffleOnReset": serializeToBson([
|
"shuffleOnReset": serializeToBson([
|
||||||
"all": false,
|
"all": false,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
unittest {
|
unittest {
|
||||||
foo([
|
foo([
|
||||||
target.value.region[1], target.value.region[1],
|
target.value.region[1], target.value.region[1], target.value.region[1],
|
||||||
target.value.region[1], target.value.region[1], target.value.region[1]
|
target.value.region[1], target.value.region[1]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@ unittest {
|
||||||
]),
|
]),
|
||||||
"short": Bson(["a": "b", "c": "d"]),
|
"short": Bson(["a": "b", "c": "d"]),
|
||||||
"numbers": Bson([
|
"numbers": Bson([
|
||||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2,
|
||||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0
|
3, 4, 5, 6, 7, 8, 9, 0
|
||||||
]),
|
]),
|
||||||
"shuffleOnReset": serializeToBson([
|
"shuffleOnReset": serializeToBson([
|
||||||
"all": false,
|
"all": false,
|
||||||
|
|
Loading…
Reference in New Issue