Skip to content

(C#) Support digit separators #4258

@mgirolet-gl

Description

@mgirolet-gl

Describe the issue
Digit separators are not supported: if you write 20_000_000 for example, 20 will be number-colored, while _000_000 will be treated as invalid.

Which language seems to have the issue?
C#

Are you using highlight or highlightAuto?
highlight

Sample Code to Reproduce

int i = 20_000_000;

Screenshot of broken syntax highlighting

Expected behavior
the entirety of the number to be highlighted as a number, like on GitHub:
Screenshot of correct syntax highlighting

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions