You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add rule for the closing newline on raw string literals (#44535)
Replaces #44534, which targeted the wrong branch. (@gewarren Not sure why our rules didn't prevent it from being merged).
Addresses anonymous feedback. Add a rule that the final newline before the closing quote characters is ignored
Copy file name to clipboardExpand all lines: docs/csharp/language-reference/tokens/raw-string.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ The following rules govern the interpretation of a multi-line raw string literal
22
22
- Whitespace following the opening quote on the same line is ignored.
23
23
- Whitespace only lines following the opening quote are included in the string literal.
24
24
- If a 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.
25
+
- The newline before the closing quotes isn't included in the literal string.
25
26
26
27
You may need to create a raw string literal that has three or more consecutive double-quote characters. Raw string literals can start and end with a sequence of at least three double-quote characters. When your string literal contains three consecutive double-quotes, you start and end the raw string literal with four double quote characters:
0 commit comments