dotnet / razor

Compiler and tooling experience for Razor ASP.NET Core apps in Visual Studio, Visual Studio for Mac, and VS Code.
https://asp.net
MIT License
489 stars 190 forks source link

Brace Pair Colorization is incorrect #9013

Open 333fred opened 1 year ago

333fred commented 1 year ago

Version: Version 17.7.0 Preview 4.0

Repro

Create a file with some braces in it. This repros with something as simple as:

<td class="blah" title="@("blah")"/>

but lots of other things have inconsistent behavior. Tuple patterns in switches, as another example, or casts.

image

333fred commented 1 year ago

Visual sample of the tuple pattern inconsistencies:

image

davidwengier commented 1 year ago

This issue is tracked in VS Feedback by https://developercommunity.visualstudio.com/t/Brace-Pair-Colorization-Issue-in-Razor-C/10380455 and internally at https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1829638 (Microsoft only).

Will leave this open as a tracking issue, since I think we don't have anything for it on GitHub.

LuohuaRain commented 1 year ago

And also, brace pair colorization doesn't work with single quotation marks in VS Version 17.7.0 Preview 6.0

image