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

Textmate: fix Razor expression classification inside of HTML tags #7051

Merged
merged 4 commits into from Apr 16, 2024

Conversation

jordi1215
Copy link
Member

@jordi1215 jordi1215 commented Apr 15, 2024

  • 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

Before

before_vs_code

After

after_vs_code

- 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
@jordi1215 jordi1215 requested review from a team as code owners April 15, 2024 21:19
Copy link
Contributor

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, I think this is good as a workaround for VS, but would prefer a better solution where semantic classification is considered.

src/razor/syntaxes/aspnetcorerazor.tmLanguage.json Outdated Show resolved Hide resolved
we updated the a textmate grammar clause name in razor to be more specific
@jordi1215 jordi1215 merged commit 7166bf7 into main Apr 16, 2024
13 checks passed
@jordi1215 jordi1215 deleted the dev/jordi1215/fix-html-textmate branch April 16, 2024 17:51
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

Successfully merging this pull request may close these issues.

None yet

2 participants