Skip to content

Document raw string literals #29079

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

Merged
merged 11 commits into from
Apr 15, 2022
Merged

Conversation

BillWagner
Copy link
Member

@BillWagner BillWagner commented Apr 15, 2022

Fixes #28941

Add raw string literals to the C# guide:

  • The language reference updates the string literals to include the new raw string literal syntax and interpolated raw string literals.
  • The language reference page on interpolated string literals discusses the raw string literal syntax for interpolated strings
  • The programming guide adds several examples for the raw string literal syntax.
  • The what's new page points to these updates.

Internal review links:

The changes to the how to article weren't substantive. The location of the embedded sample code moved.

The article in the programming guide hadn't been updated in some time, so also had a general edit pass. You may want to disable whitespace to see the diffs more cleanly.

Make the edits for raw string literals to most content. For the programming guide content, move samples, format and update existing content.
@BillWagner BillWagner force-pushed the raw-string-literals branch from 2201459 to 7364f58 Compare April 15, 2022 14:34
@BillWagner BillWagner changed the title Cover Raw string literals Document raw string literals Apr 15, 2022
@BillWagner BillWagner marked this pull request as ready for review April 15, 2022 19:13
@BillWagner BillWagner requested a review from IEvangelist as a code owner April 15, 2022 19:13
@BillWagner BillWagner requested a review from tdykstra April 15, 2022 19:13
@BillWagner
Copy link
Member Author

/cc @KathleenDollard if you want to review.

@CyrusNajmabadi
Copy link
Member

This markdown looks bad:

image

Who owns the markdown processing?

@BillWagner
Copy link
Member Author

This markdown looks bad:

image

Who owns the markdown processing?

Adding @mimisasouvanh

See here This is a new feature in C# 11. It looks like the syntax coloring for docs doesn't support this feature yet. Where should I track this?

BillWagner and others added 2 commits April 15, 2022 17:01
Co-authored-by: CyrusNajmabadi <cyrus.najmabadi@gmail.com>
string multiLine = """
"Hello World!" is typically the first program someone writes.
""";
string embeddedXML = """
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know how we get mark down fixed for raw string literals? I just used a screens shot (Cyrus's suggestion)

Copy link
Contributor

@tdykstra tdykstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, clear and concise. I noted only a few nits.

@BillWagner BillWagner enabled auto-merge (squash) April 15, 2022 21:52
@BillWagner BillWagner merged commit 75337a7 into dotnet:main Apr 15, 2022
@BillWagner BillWagner deleted the raw-string-literals branch April 18, 2022 18:48
@BillWagner BillWagner added the okr-freshness OKR: Freshness of content label Apr 18, 2022
IEvangelist pushed a commit to IEvangelist/docs that referenced this pull request Apr 21, 2022
* Update existing samples

Make the edits for raw string literals to most content. For the programming guide content, move samples, format and update existing content.

* warnings, and move one more sample.

* first draft is completed.

* fix build warnings and proofread.

* fix snippet tags.

* Apply suggestions from code review

Co-authored-by: CyrusNajmabadi <cyrus.najmabadi@gmail.com>

* respond to feedback.

* respond to feedback.

* move raw interpolated string literals to code

* Apply suggestions from code review

Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>

* respond to feedback.

Co-authored-by: CyrusNajmabadi <cyrus.najmabadi@gmail.com>
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[17.2] Raw string literals
5 participants