dotnet / dotnet/vscode-csharp

C# Hover Method with // (slash-slash) in constant shows incorrect IntelliSense / Help

Open
#6,654 2 comments 0 reactions 1 assignee Claimed by @dibarbet View on GitHub
Bug Triaged
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
18h 40m
Merged PRs (30d)
31

Description

Copied from https://github.com/microsoft/vscode-dotnettools/issues/668#, filed by @iJungleboy

### Describe the Issue

When code has `//` characters in the help text then IntelliSense looks broken.

![image](https://github.com/microsoft/vscode-dotnettools/assets/5321186/bf18e80a-b518-4ebd-a4b8-14205d5a9cfc)

### Steps To Reproduce

Create a `.cs` file like this:

```cs
public class VsCodeBug
{
public void Test(string before, string problem = "see https://xyz.com", string after = null)
{
Test("before");
}
}
```

Then over the call on `Test("before")` and you'll see the what's in the screenshot.

### Expected Behavior

string literals should be self-closing and not bleed out into anything else.

### Environment Information

VS Code 1.83.1

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.