razor: Razor Comment Colorization doesn't colorize all lines

Expected:

@code {
    private int currentCount = 0;

    @* public class SomeAbstractClassImpl : AbstractClass
    {
        var dt = new DateTime();
    }
    
    public class SomethingDisposable : IDisposable
    {
        
    } *@
}

image

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

@TanayParikh yeah looks like that PR missed the deadline by a day or two, should be fixed in VSCode just by releasing the latest.

In VS after Platform fixes and TextMate un-commenting. image In VSCode: image

image The above is achieved by removing some TextMate color info.

I just ran into this while developing in VS Code. Seems to only happen inside the @code block. Commented out Razor is properly grayed out.

image

Not sure if this is the same issue, but ran into:

Multiline comment (Note: VSCode v1.23.11)

in a .cshtml file (within JS). Not sure if @* is meant to be supported within .cshtml/.js or not (if not, then I wouldn’t expect <kbd>CTRL</kbd>+<kbd>/</kbd> to comment the block with @* *@

Looks like C# is taking precedence: image