Skip to content

add alias "cs" for csharp #1962

@drewburlingame

Description

@drewburlingame

https://github.com/pygments/pygments/blob/master/pygments/lexers/dotnet.py#L50

Github supports cs, c# and csharp as seen in the examples below. Other tooling also supports cs. One such tool is MarkdownSnippets which
can be used to copy snippets from source code into documents. The language used defaults from the file extension, which is reasonable for many languages.

Can a cs alias be added to the dotnet csharp lexer? It looks as simple as adding the alias to the line I linked to above. I didn't find tests for the aliases. Should I create a PR?

var s = "lala"
var s = "lala"
var s = "lala"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions