From e48c5797300aaae4bd581ee01cdae612fd127e79 Mon Sep 17 00:00:00 2001 From: Bela VanderVoort Date: Fri, 22 Nov 2024 10:36:00 -0600 Subject: [PATCH] fixing another extra line issue (#1391) closes #1390 --- .../TestFiles/cs/CollectionExpressions.test | 11 +++++++++++ .../SyntaxNodePrinters/CollectionExpression.cs | 1 + 2 files changed, 12 insertions(+) diff --git a/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/CollectionExpressions.test b/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/CollectionExpressions.test index 790a1585a..83da086b4 100644 --- a/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/CollectionExpressions.test +++ b/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/CollectionExpressions.test @@ -86,6 +86,17 @@ CallMethod(_ => ] ); +Dictionary dictionary = new() +{ + { + "Key", + [ + "SomeValue__________________________________________", + "SomeValue__________________________________________", + ] + }, +}; + class MyClass { private readonly List _items; diff --git a/Src/CSharpier/SyntaxPrinter/SyntaxNodePrinters/CollectionExpression.cs b/Src/CSharpier/SyntaxPrinter/SyntaxNodePrinters/CollectionExpression.cs index 5f7429ecc..1d52c938e 100644 --- a/Src/CSharpier/SyntaxPrinter/SyntaxNodePrinters/CollectionExpression.cs +++ b/Src/CSharpier/SyntaxPrinter/SyntaxNodePrinters/CollectionExpression.cs @@ -10,6 +10,7 @@ or AttributeArgumentSyntax or ArrowExpressionClauseSyntax or CastExpressionSyntax or ExpressionElementSyntax + or InitializerExpressionSyntax or SimpleLambdaExpressionSyntax or AssignmentExpressionSyntax {