dotnet / dotnet/csharp-tmLanguage
Non-ASCII identifier syntax highlighting
- Dominant language
- TypeScript
- Stars
- 78
- Forks
- 43
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
The following code [compiles and run](https://sharplab.io/#v2:EYLgxg9gTgpgtADwGwBYA0AXEUCuA7AHwAEAmARgFgAoIgZgAJT6Bhagb2vq8bKR4AZ6wAIZQAFAEp6Aemn1AKOSB4P87cOVbhsYB2egCIRUXQG4VXAL7VTMuUV4D6AMwBvTyVdt9bggDo5+/JCRffwAxIL9+MMlrekAMcno4ehgEAAcYMAwYABN6YIDw0ILIvgwIegALYQA3GHoAZ2EAW1rIABtoemE6oVF6DoBZYQBLPCs1TW4iHV0MBAxjKwsqdxISMasNWwBOMWdXCQkjGPjE5LSM7McXelKK6tqG5vo2jq6eqD6PwZGNybIdvKBPJhYFISSHY4JJKpdKZHKAoogiJhG5lSo1epNFoQdofN4GT70b6jdQTHg7Azgo6yBTKUnmahmIA==), but the syntax highlighting in GitHub and VSCode do not identify escaped or unescaped non-ascii identifiers properly:
```c#
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()); // ✔️
}
}
```
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).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.