-
-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Milestone
Description
I see some of the formatting issues with C# 12 collection expressions were fixed in #1047 but I think I have found another one.
I'm using version 0.26.4 and have found that the following code:
public List<HttpRequestMessage> Requests { get; } =
[
new()
{
Content = new StringContent("content"),
Headers = { { "header", "value" } },
Method = HttpMethod.Post
}
];will get formatted to
public List<HttpRequestMessage> Requests { get; } =
[
new()
{
Content = new StringContent("content"),
Headers = { { "header", "value" } },
Method = HttpMethod.Post
}
];i.e. it leaves a blank line between the property declaration and the value. This isn't consistent with the behaviour for fields or auto-properties (=>) which don't add a blank line so I assume it's unintentional.
Metadata
Metadata
Assignees
Labels
No labels