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

C# Syntax highligting in razor files incorrect for nullable properties #191

Closed
tn-5 opened this issue Feb 4, 2021 · 1 comment
Closed

Comments

@tn-5
Copy link

tn-5 commented Feb 4, 2021

When defining a nullable property in the @code block in a razor file the syntax highlighting does not work correctly.

Details copied from: https://github.com/dotnet/aspnetcore/issues/24791

Reproduce

  • Generate standard template project: dotnet new blazorserver
  • Open in VS Code
  • Open FetchData.razor
  • Observe syntax highlighting correctly highlights WeatherForecast as a class/type

Add nullable field

  • Add string? test; before the WeatherForecast declaration
  • Observe that the highlighting of WeatherForecast is still correct

Add nullable property

  • Add string? test1 {get; set;} before the WeatherForecast declaration
  • Observe that the highlighting of WeatherForecastnow reverts to generic text

It does not seem to make any difference if the setting on the project file is enabled or not.

@davidwengier
Copy link

This was fixed by dotnet/razor#7019

Feed free to close :)

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

3 participants