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

Razor syntax highlighting broken in VSCode when using nullable operator #6631

Closed
MatthewS2077 opened this issue Jul 22, 2022 · 3 comments · Fixed by dotnet/vscode-csharp#5570

Comments

@MatthewS2077
Copy link

Describe the bug:
In VSCode, Razor syntax highlighting is broken when using nullable operator "?"

Version used:
VSCode 1.69.2
.Net 7.0.100-preview.6.22352.1

To reproduce:
Open the following in VSCode

@Param1
@Param2

@code {
    [Parameter]
    public string? Param1 { get; set; }

    [Parameter]
    public string? Param2 { get; set; }

    private string Foo()
    {
        return "bar";
    }
}

Expected behavior:
Razor syntax highlighting should work as expected when using nullable operator "?" (see screenshot 1)

Actual behavior:
Razor syntax highlighting is broken when using nullable operator "?" (see screenshot 2)

Additional context:

Screenshot 1 - Syntax highlighting working when not using nullable operator
Screenshot 1 - Syntax highlighting working when not using nullable operator

Screenshot 2 - Syntax highlighting not working when using nullable operator
Screenshot 2  - Syntax highlighting not working when using nullable operator

@allisonchou
Copy link
Contributor

Additional report: #6144

@allisonchou
Copy link
Contributor

Additional report: #7076

@allisonchou
Copy link
Contributor

Additional report: #8184

@ghost ghost locked as resolved and limited conversation to collaborators Mar 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants