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

[C#] C#11's raw string literals (multi-line strings) are not handled #3788

Closed
Jackenmen opened this issue Jun 10, 2023 · 3 comments
Closed

Comments

@Jackenmen
Copy link

What happened?

image

string longMessage = """
    This is a long message.
    It has several lines.
        Some are indented
                more than others.
    Some should start at the first column.
    Some have "quoted text" in them.
    """;

This feature was first available in C#11 Preview in April 2022 and has since been released as part of the .NET 7 update on November 2022:
https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-11#raw-string-literals

@deathaxe
Copy link
Collaborator

Support for raw literals was added by #3659 and was released with ST4149.

@Jackenmen
Copy link
Author

Jackenmen commented Jun 10, 2023

@deathaxe Hi, I've noticed an issue on ST 4150 with how this works with an interpolation:
image

var location = $"""
   You are at {{{Longitude}}, {{Latitude}}}
   """;

Is this something that #3720 is supposed to track or should I make another issue for it?

@deathaxe
Copy link
Collaborator

That's a separate issue. #3720 is about structuring syntax definition like python, as the new raw literals seem equaly complex.

There may be more issues, as PR #3659 claims to be a start for literal support only.

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

No branches or pull requests

2 participants