csharp-tmLanguage icon indicating copy to clipboard operation
csharp-tmLanguage copied to clipboard

Non-ASCII identifier syntax highlighting

Open am11 opened this issue 4 years ago • 0 comments

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).

am11 avatar Sep 20 '20 18:09 am11