I wasn't sure if this should go to VS or if it belongs here (especially with the Evolution work going on.)
In Visual Studio, when auto-formatting a Razor document, a code block nested inside of an if block will cause the indentation of any code following the if block to be increased to match the indentation of the code inside of the code block.
This is driving me 馃敥 馃敥 !

Moving the code out of the code block to be just inside the if block seems to clear it up:

Thanks, and yes this is a good place for you to open Razor issues. We'll investigate and communicate with the non-OSS parts of the team as necessary.
@NTaylorMullen - can you take a look at this and see what's going on?
Findings:
GetDesiredIndentation service method.Removed investigate label.
Move out?
I spoke with @NTaylorMullen this morning - the takeaway here is that this is something we can and should fix, but with some bake time as it's going to be a little risky.
We don't currently handle indent when the cursor is positioned inside a code span. We'd need to write that logic, and we don't want to rush that process. We'll take this on for the next foundational update where we will have some bake time.
+1 very annoying indeed. Every brace or semicolon in any method in @functions will break the whole document.
Moving this out from backlog to be addressed... Let's make sure we also have good tests for this area so this will never be a thing going forward.
please ensure that the fix covers the test cases in #2107
@NTaylorMullen, @danroth27 also has a repro, if you're interested
I was able to reproduce this but when I debugged this, it looks like our code (GetDesiredIndentation) isn't being called when it should be. Discussed with @NTaylorMullen. Looks like something changed with the editor formatting and the fix should go in there. Going to discuss with @ToddGrun and file an issue there.
Spoke to @ToddGrun and Bhavya. This is now being tracked here.
Closing as we track this separately.
Most helpful comment
Moving this out from backlog to be addressed... Let's make sure we also have good tests for this area so this will never be a thing going forward.