dotnet / dotnet/vscode-csharp

Raw string literals have very poor support

Open
#8,231 1 comment 0 reactions 0 assignees View on GitHub
Feature Request
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
18h 40m
Merged PRs (30d)
31

Description

### Environment Data
VS Code version: 1.99.3
C# Extension version: 2.74.24

### Steps to Reproduce

1. Attempt to declare a raw string literal anywhere by typing its opening 3 (or more) quotation marks:
```cs
string s = """|
```
Where `|` is the cursor position.

### Expected Behavior

The corresponding 3 quotation marks should be inserted on the other side of the cursor.
Inserting a new line then formats the quotation marks like below:
```cs
string s = """
|
"""
```
Where `|` is the cursor position.

### Actual Behavior

The corresponding 3 quotation marks are not inserted.
Inserting a new line results in the cursor being on the same level as the declaration:
```cs
string s = """
|
```
Where `|` is the cursor position.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.