Collection expression inside a dictionary adds unexpected new line (original) (raw)

Running on csharpier 0.30.1

Input:

static Dictionary<string, string[]> dictionary = new() { { "Key", [ "ItemWithLongEnoughNameToNotJoin1", "ItemWithLongEnoughNameToNotJoin2", "ItemWithLongEnoughNameToNotJoin3", "ItemWithLongEnoughNameToNotJoin4", ] }, };

Output:

static Dictionary<string, string[]> dictionary = new() { { "Key",

    [
        "ItemWithLongEnoughNameToNotJoin1",
        "ItemWithLongEnoughNameToNotJoin2",
        "ItemWithLongEnoughNameToNotJoin3",
        "ItemWithLongEnoughNameToNotJoin4",
    ]
},

};

Expected behavior:

static Dictionary<string, string[]> dictionary = new() { { "Key", [ "ItemWithLongEnoughNameToNotJoin1", "ItemWithLongEnoughNameToNotJoin2", "ItemWithLongEnoughNameToNotJoin3", "ItemWithLongEnoughNameToNotJoin4", ] }, };