Skip to content

Non-ASCII identifier syntax highlighting #186

@am11

Description

@am11

The following code compiles and run, but the syntax highlighting in GitHub and VSCode do not identify escaped or unescaped non-ascii identifiers properly:

using System;
public class C
{
    static string bar() // ✔️
    {
        return "bar";
    }

    // static string föö()
    static string \u0066\u00F6\u00F6() // ✘ - expected \u0066\u00F6\u00F6 to have same color as bar or Main
    {
        return "txt";
    }

    public static void Main()
    {
        Console.WriteLine(föö()); // ✘ - expected föö to have same color as bar or Main
        Console.WriteLine(\u0066\u00F6\u00F6()); // ✘ - expected \u0066\u00F6\u00F6 to have same color as bar or Main
        Console.WriteLine(bar()); // ✔️
    }
}

image

VSCode is at least highlighting `föö()` properly (GitHub linguist probably needs an update to sync with the latest grammar update which eventually consumes this repo).

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