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
Textmate: fix Razor expression classification inside of HTML tags using injection #7055
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- added textmate grammar to both razor and html (test) files so that we can correctly label razor components that are within html tags. We will need to update the html grammar used in razor as well - updated tests to reflect the desire behavior, note that we changed some of the classification from existing tests as they were not correctly labeling razor grammar in html tags either
- added textmate grammar to both razor and html (test) files so that we can correctly label razor components that are within html tags. We will need to update the html grammar used in razor as well - updated tests to reflect the desire behavior, note that we changed some of the classification from existing tests as they were not correctly labeling razor grammar in html tags either
…dotnet/vscode-csharp into dev/jordi1215/fix-html-textmate
we updated the a textmate grammar clause name in razor to be more specific
- this commit explores a new way of injecting razor textmate grammar into the html textmate grammar. so that razor expressions can still be recognized inside html tags without having to directly change any of the html textmate - we also updated some grammar tests to make the test cases more comprehensive regarding this matter
- revert the changes made to html.tmlanguage.json so that it matches the one on the textmate repo
davidwengier
approved these changes
Apr 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing!
- removed a clause in the razor textmate that is not needed anymore
Noticed a changed when writing code in Blazor and just popping in to say awesome job, works great 👍 |
Thanks for confirming, and the kind words @GlacierFox FYI @jordi1215 😄 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes some problem created in #7051. In this new approach, we use the "injection" feature of the textmate grammar so that we don't have to change the grammar of html.