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
505 stars 195 forks source link

[FUSE] Folding range whitespace differences at the end of blocks #10860

Open davidwengier opened 2 months ago

davidwengier commented 2 months ago

Not sure if this is a tooling issue, or difference in results from Roslyn caused by a runtime/designtime compilation difference.

Example differences: image

From: https://github.com/dotnet/razor/commit/f929020b391baae015ded4a723f4d773c5d105df?diff=unified&w=0#diff-a1706b971c83e9c0c358e3db52e305ad63a07dc5a88c23d2ae265ce9e06eaf54L30

I think this is a bad user experience as, in the example above, the closing div tag would end up displayed on the same line as the @if when collapsed.

davidwengier commented 1 month ago

https://github.com/dotnet/razor/pull/10959 marks an integration test as skipped referencing this issue. Please unskip when fixing :)

jaredpar commented 1 month ago

@chsienki

chsienki commented 1 month ago

@jaredpar Yep, I mentioned this one previously. We've been fixing these on an ad-hoc basis but it turns out it's an issue with any @ directive that razor parses directly.

I plan to fix that holistically rather than doing more one at a time patches, but we're getting into the long tail of what users actually see so not considering this a blocker for fuse rollout right now.

(Aside, apologies I guess I didn't put these issues into milestones but have already triaged them).