Version Used:
2.6.1
Steps to Reproduce:
- Compile the following code
using System;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
var code =
@"
using System;
public class Foo
{
public static void Main()
{
Console.WriteLine($""{Guid.NewGuid():N}"");
}
}
";
var node = SyntaxFactory.ParseSyntaxTree(code, new CSharpParseOptions(LanguageVersion.CSharp7_2))
.GetCompilationUnitRoot()
.NormalizeWhitespace("\t");
Console.WriteLine(node);
}
}
}
Expected Behavior:
Should output:
using System;
public class Foo
{
public static void Main()
{
Console.WriteLine($"{Guid.NewGuid():N}");
}
}
Actual Behavior:
The output includes a space after the : and before the N. This causes the resulting program to fail to run because ": N" is not a valid format specifier.
using System;
public class Foo
{
public static void Main()
{
Console.WriteLine($"{Guid.NewGuid(): N}");
}
}
Version Used:
2.6.1
Steps to Reproduce:
Expected Behavior:
Should output:
Actual Behavior:
The output includes a space after the
:and before theN. This causes the resulting program to fail to run because ": N" is not a valid format specifier.