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

cshtml code highlights various parts incorrectly #3354

Closed
federicodiluca opened this issue Feb 25, 2022 · 0 comments · Fixed by #3355
Closed

cshtml code highlights various parts incorrectly #3354

federicodiluca opened this issue Feb 25, 2022 · 0 comments · Fixed by #3355

Comments

@federicodiluca
Copy link

federicodiluca commented Feb 25, 2022

Information

  • Language: Razor / cshtml
  • Plugins: none

Does the latest version of Prism from the download page also have this issue?
YES

Description
Various parts of .cshtml code are highlighted incorrectly (e.g. helper, cs attributes). Please check the below screenshots.

Code snippet
Here it is the test page to reproduce the issue.

The code being highlighted incorrectly.
<input type="text" placeholder="@Localize.GetLabelHtml("PLACEHOLDER")"/>

<h1>
    @Localize.GetLabelHtml("TITLE")
</h1>

@{
    var man = "Federico";
    var text = string.Concat("Nice to meet you", " ", man);
}

@helper TrialHelper(string name) {
    var text = string.Concat("Hello", " ", name);
    <h1>
        @(text + ", how's going?")
    </h1>
    <p>
        Hello World!
    </p>
}

Screenshots

How it is currently rendered:

image

How it is rendered in Visual Studio:

image

@federicodiluca federicodiluca changed the title cshtml code highlights various parts incorrectly (e.g. helper, cs attributes) cshtml code highlights various parts incorrectly Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants