Skip to content

Add support for C# as a language identifier in markdown preview code block syntax highlighting #61240

@Logerfo

Description

@Logerfo

Currently, as far as I am aware, the only accepted language identifiers for C# code blocks in the markdown preview are cs and csharp.
Other markdown previewers, like github and gitlab issue trackers, supports a third alternative: c#, as the following:

```csharp
public int M() => 2; //works everywhere
```
```c#
public int M() => 2; //doesn't work in vscode markdown preview
```

My feature is request is for vscode to allow the mentioned alternative identifier. I also noticed something strange: the c# identifier works inside the editor, but not in the preview. I'd call this an inconsistency.
image

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesmarkdownMarkdown support issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions