csharpier icon indicating copy to clipboard operation
csharpier copied to clipboard

Adds additional space before each member access in verbatim interpolated multiline string

Open ulrichstark opened this issue 4 months ago • 0 comments

Input:

class Utils
{
    string GetTypeName(object value)
    {
        return $@"
                  {value.GetType().Name} text text text text text text text text text text text text";
    }
}

Output:

class Utils
{
    string GetTypeName(object value)
    {
        return $@"
                  {value .GetType() .Name} text text text text text text text text text text text text";
    }
}

Expected behavior:

CSharpier shouldn't add a space after value and GetType(). To replicate, paste the input code into https://playground.csharpier.com/ and leave options to default (print width = 100). The output is correct when removing one "text" from the string.

ulrichstark avatar Oct 15 '24 12:10 ulrichstark