diff --git a/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/UnhandledNode.test b/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/UnhandledNode.test new file mode 100644 index 000000000..f5cf8c431 --- /dev/null +++ b/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/UnhandledNode.test @@ -0,0 +1,2 @@ +// make sure to print leading trivia on unhandled nodes +scoped Span byteBuffer; diff --git a/Src/CSharpier/SyntaxPrinter/UnhandledNode.cs b/Src/CSharpier/SyntaxPrinter/UnhandledNode.cs index fb2dc9df7..9f4949c0e 100644 --- a/Src/CSharpier/SyntaxPrinter/UnhandledNode.cs +++ b/Src/CSharpier/SyntaxPrinter/UnhandledNode.cs @@ -4,6 +4,6 @@ internal static class UnhandledNode { public static Doc Print(SyntaxNode node, FormattingContext context) { - return node.ToString(); + return node.ToFullString(); } }