Open vsfeedback opened 2 years ago
Can repro, try typing out the inner divs here:
@if (true)
{
<div>
@if (true)
{
<div>
<div></div>
</div>
}
</div>
}
Dug into this and I think this is a compiler issue.
For example, take the following code:
@if (true)
{
<div>
@if (true)
{
<div>
}
</div>
}
The compiler associates the inner starting div tag with the closing div tag. I believe instead it should associate the outer starting div tag with the closing div tag.
@NTaylorMullen before I transfer over the issue, does this logic check out?
@NTaylorMullen before I transfer over the issue, does this logic check out?
Totally checks out! Transfer away 😄
This may be a dupe of dotnet/razor-tooling#7616
Lots of context for this issue is here: https://github.com/dotnet/razor-tooling/issues/7616
I just recently update to VS 2022 17.2.3 as a suggestion to fix this bug.
The bug is still there.
This bug is present on Microsoft Visual Studio Community 2022 (64-bit) Version 17.2.6.
This bug is unlikely to be fixed soon, as error recovery in the razor compiler is extremely complicated and we need a large amount of work to fix it. Continued comments of where this appears isn't going to push progress. In particular, the example Allison showed at https://github.com/dotnet/razor-tooling/issues/7608 is likely to be near impossible to recover from. Please upvote the original post if you want to express that this is affecting you.
@333fred I think the issue with this bug is that people keep posting new issues and they are closed with duplicate and reference some other issue (like dotnet/razor-tooling#7616 , but there are many others). I deal with this all day long making VS so frustrating to use that I am considering another IDE for the first time EVER. Rider being the first one on my list - which is a lot cheaper than VS,
While I understand it's complicated and "computer science is hard" it was the MS team that decided to drop the previous editor and force this one on everyone when it was buggy in preview.
Any status update on this issue? Autocompletion of nested div
is still broken as of the latest 2023 update.
This issue has been moved from a ticket on Developer Community.
When working on markup on a razor page in a blazor wasm project the auto-closing of tags does not seem to work properly when inside a @{ } code block. For example, if I am typing markup outside of a code block when I type a
Original Comments
Feedback Bot on 11/18/2021, 09:57 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)