Take this simple code markdown:
```cs
var x = new Locked<Rec>(new ("John", 35));
```
This renders in GitHub readme like this:
I now just add a definition:
```cs
record Rec(string Name, int Age);
var x= new Locked<Rec>(new ("John", 35));
```
and it now renders like this:
As you can see the type Locked
and the new
are for some reason no longer coloured purple. Why is this and how can I get around it ?
CodePudding user response:
Visual Studio Code does the same thing.
It works even better if you declare the record inside Main
as well: