Writing code in Blazor, the indentation is off

Viewed 838

When writing code in a Blazor (.razor) component, it formats it like this:

@code {
    void Abc()
        {

        }
}

Then I'll correct the indentation:

@code {
    void Abc()
    {

    }
}

but then whenever I insert an if condition, the indentation is messed up:

@code {
    void Abc()
    {
        if (true)
            {

            }
    }
 }

It's like it has an off-by-one indent problem. I don't know if it's me or Visual Studio. This is not a problem in a .cs file.

0 Answers
Related