-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Razor implicit/explicit expressions in HTML attributes are not colored properly #20140
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
Labels
Milestone
Comments
NTaylorMullen
pushed a commit
to dotnet/razor
that referenced
this issue
Mar 25, 2020
- This makes our new Razor LSP editor bits look almost identical to the existing VS experience. - There are several issues in regards to C# in attributes and that's tracked here: dotnet/aspnetcore#20140 - There's no semantic colorization for tags or C# yet either so that breaks down the colorization expected for our Blazor components and TagHelpers. - Had to name the textmate grammar with the specific name of `aspnetcorerazor.tmLanguage.tmTheme` in order to enable the VS themeing support to locate our theme. - One big colorization difference that can't currently be supported is the background coloring of our C# bits. This is something VS' CoreEditor is willing to change on our behalf though. Fixes dotnet/aspnetcore#18769
This impacts the immediate colorization experience of the Razor editor in default templates. Pulling into our alpha release. |
NTaylorMullen
pushed a commit
to dotnet/razor
that referenced
this issue
Mar 26, 2020
- This makes our new Razor LSP editor bits look almost identical to the existing VS experience. - There are several issues in regards to C# in attributes and that's tracked here: dotnet/aspnetcore#20140 - There's no semantic colorization for tags or C# yet either so that breaks down the colorization expected for our Blazor components and TagHelpers. - Had to name the textmate grammar with the specific name of `aspnetcorerazor.tmLanguage.tmTheme` in order to enable the VS themeing support to locate our theme. - One big colorization difference that can't currently be supported is the background coloring of our C# bits. This is something VS' CoreEditor is willing to change on our behalf though. Fixes dotnet/aspnetcore#18769
FYI: @ryanbrandenburg @noahbkim Sample Text to try this out during validations (screenshots of before / after are in the PR). Explicit
Implicit
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Our TextMate grammar doesn't look like it properly supports Razor expressions in HTML attributes.
Easiest way to repro is to create a new Blazor project and then open
NavMenu.razor
. There's this line that doesn't colorize correctly:The text was updated successfully, but these errors were encountered: