Skip to content

Razor syntax highlighting fails for multi-line comments and LF endings #8176

@hopperpl

Description

@hopperpl

Visual Studio 2022 17.5 P4

I'm not sure if this belongs into this repository, or somewhere else, I don't know if razor tooling also maintains the VS language service for .razor files. Please move if needed.

The syntax highlighter fails to correctly display multi-line comments within @* ... *@ when the line ending is set to LF. It works correctly when it's CRLF. This got worse with Preview 3 and Preview 4; before P3, this issue only applied to the footer comment, now the header comment is failing as well and pretty much everywhere. A purely cosmetic issue though.


image

LF endings, all is white although the comment markers are purple.


image

now switched to CRLF and all is correct.


image

this summarizes the issue in one image.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions