Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ulrichstark opened this issue Oct 15, 2024 · 0 comments · Fixed by #1373
Closed
Milestone

Comments

@ulrichstark
Copy link

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.

@belav belav added this to the 1.0.0 milestone Oct 16, 2024
belav added a commit that referenced this issue Nov 3, 2024
shocklateboy92 pushed a commit that referenced this issue Nov 4, 2024
pisolofin pushed a commit to pisolofin/csharpier-editorconfig that referenced this issue Nov 16, 2024
@belav belav modified the milestones: 1.0.0, 0.30.0 Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants