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

Extra info about raw string literals #40678

Closed
RexJaeschke opened this issue Apr 30, 2024 · 4 comments · Fixed by #40869
Closed

Extra info about raw string literals #40678

RexJaeschke opened this issue Apr 30, 2024 · 4 comments · Fixed by #40869
Labels
doc-enhancement Improve the current content [org][type][category] dotnet-csharp/svc help wanted Good for community contributors to help [up-for-grabs] lang-reference/subsvc Pri1 High priority, do before Pri2 and Pri3

Comments

@RexJaeschke
Copy link

Type of issue

Missing information

Description

I'm writing the formal spec for this feature for the Ecma C# standard, and came across several scenarios your on-line help doesn't mention.

A. The raw string literal's content must not contain a set of contiguous " characters whose length is equal to or greater than the raw string literal delimiter length. For example, the strings """" """ """" and """"""" """""" """"" """" """ """""""are well-formed. However, the strings """ """ """ and """ """" """ are ill-formed.

B. In a multiline raw string literal, if whitespace precedes the end delimiter on the same line, the exact number and kind of whitespace characters (e.g., spaces vs. tabs) must exist at the beginning of each content line. Specifically, a space does not match a horizontal tab, and vice versa. When using VS, it appears that the editor replaces tabs with spaces, making the leading whitespace the same, but when I used the command-line compiler, csc, on a source file containing leading tabs on some lines and spaces on others, I got an error telling me the leading whitespace did not match.

[Enter feedback here]

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/raw-string

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/tokens/raw-string.md

Document Version Independent Id

5737c986-9b06-9444-f7bc-893607d390d7

Article author

@BillWagner

Metadata

  • ID: 62bd57d5-0e7d-4355-0689-4b6b90ab4057
  • Service: dotnet-csharp
  • Sub-service: lang-reference
@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Apr 30, 2024
@issues-automation issues-automation bot added dotnet-csharp/svc lang-reference/subsvc Pri1 High priority, do before Pri2 and Pri3 labels Apr 30, 2024
@BillWagner BillWagner added the doc-enhancement Improve the current content [org][type][category] label May 1, 2024
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label May 1, 2024
@BillWagner BillWagner added help wanted Good for community contributors to help [up-for-grabs] ⌚ Not Triaged Not triaged labels May 1, 2024
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label May 1, 2024
@BillWagner
Copy link
Member

Thanks Rex. I've added this to our backlog for when we next update this page.

@bigboybamo
Copy link
Contributor

Hi @BillWagner, Can I pick this up? I saw it marked as help wanted

@BillWagner
Copy link
Member

Hi Can I pick this up? I saw it marked as help wanted

@bigboybamo Yes! Thank you.

@bigboybamo
Copy link
Contributor

@BillWagner I opened a Pull request #40869

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement Improve the current content [org][type][category] dotnet-csharp/svc help wanted Good for community contributors to help [up-for-grabs] lang-reference/subsvc Pri1 High priority, do before Pri2 and Pri3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants