Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-ASCII identifier syntax highlighting #186

Open
am11 opened this issue Sep 20, 2020 · 0 comments
Open

Non-ASCII identifier syntax highlighting #186

am11 opened this issue Sep 20, 2020 · 0 comments

Comments

@am11
Copy link
Member

am11 commented Sep 20, 2020

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant