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

Fixing issues with weird indent on raw string literals as arguments #1175

Merged
merged 9 commits into from
Feb 17, 2024

Conversation

belav
Copy link
Owner

@belav belav commented Feb 11, 2024

closes #1169

@belav belav marked this pull request as draft February 11, 2024 22:54
@belav
Copy link
Owner Author

belav commented Feb 11, 2024

I fixed the extra indent, but there is also the problem of the arguments not breaking properly. It looks like this problem also exists for multiline verbatim strings so it has been here for a while. I have the problem somewhat narrowed down, so hopefully can fix it within this PR

// input/expected output
CallMethod(
    """
    SomeRawString
    """.CallMethod().CallMethod()
);

CallMethod(
    @"
    SomeVerbatimString
    ".CallMethod().CallMethod()
);

// actual output
CallMethod("""
    SomeRawString
    """.CallMethod().CallMethod());

CallMethod(@"
    SomeVerbatimString
    ".CallMethod().CallMethod());

The problem is more apparent with multiple arguments

// input/expected output
CallMethod(
    """
    SomeRawString
    """.CallMethod().CallMethod(),
    []
);

// actual output
CallMethod("""
    SomeRawString
    """.CallMethod().CallMethod(), []);

@belav belav marked this pull request as ready for review February 14, 2024 03:30
@belav belav closed this Feb 14, 2024
@belav belav reopened this Feb 14, 2024
@belav belav merged commit 3a3807f into main Feb 17, 2024
3 checks passed
@belav belav deleted the fixing-raw-weird-indent branch February 17, 2024 17:17
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 this pull request may close these issues.

Extra indent when call method on RawStringLiteral
1 participant