Skip to content

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

@ulrichstark

Description

@ulrichstark

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions