@@ -148,17 +148,7 @@ bool TryGetCompilationFailure(out CodeFormatterResult compilationResult)
148148 try
149149 {
150150 var lineEnding = PrinterOptions . GetLineEnding ( syntaxTree . ToString ( ) , printerOptions ) ;
151- var printingContext = new PrintingContext
152- {
153- NormalizedXml = string . Empty ,
154- Options = new PrintingContext . PrintingContextOptions
155- {
156- LineEnding = lineEnding ,
157- IndentSize = printerOptions . IndentSize ,
158- UseTabs = printerOptions . UseTabs ,
159- XmlWhitespaceSensitivity = XmlWhitespaceSensitivity . Strict ,
160- } ,
161- } ;
151+ var printingContext = new CSharpPrintingContext { LineEnding = lineEnding } ;
162152 var document = Node . Print ( rootNode , printingContext ) ;
163153 var formattedCode = DocPrinter . DocPrinter . Print ( document , printerOptions , lineEnding ) ;
164154 var reorderedModifiers = printingContext . State . ReorderedModifiers ;
@@ -176,17 +166,7 @@ bool TryGetCompilationFailure(out CodeFormatterResult compilationResult)
176166 return result ;
177167 }
178168
179- var formattingContext2 = new PrintingContext
180- {
181- NormalizedXml = string . Empty ,
182- Options = new PrintingContext . PrintingContextOptions
183- {
184- LineEnding = lineEnding ,
185- IndentSize = printerOptions . IndentSize ,
186- UseTabs = printerOptions . UseTabs ,
187- XmlWhitespaceSensitivity = XmlWhitespaceSensitivity . Strict ,
188- } ,
189- } ;
169+ var formattingContext2 = new CSharpPrintingContext { LineEnding = lineEnding } ;
190170 document = Node . Print (
191171 await syntaxTree . GetRootAsync ( cancellationToken ) ,
192172 formattingContext2
0 commit comments