Version Used: 17.2.0 Preview 3.0 [32327.42.main]
Similar to #57465 and found because it's blocking the same Razor formatting issues that issue was blocking.
Given:
namespace N
{
public class C
{
protected void Render()
{
if (true)
{
M(() =>
{
if (true)
{
/* marker */
}
});
}
}
}
}
Formatting the document once gives:
namespace N
{
public class C
{
protected void Render()
{
if (true)
{
M(() =>
{
if (true)
{
/* marker */
}
});
}
}
}
}
Formatting a second time gives:
namespace N
{
public class C
{
protected void Render()
{
if (true)
{
M(() =>
{
if (true)
{
/* marker */
}
});
}
}
}
}
Fixing this bug should fix dotnet/razor#6001 and dotnet/razor#5676
Version Used: 17.2.0 Preview 3.0 [32327.42.main]
Similar to #57465 and found because it's blocking the same Razor formatting issues that issue was blocking.
Given:
Formatting the document once gives:
Formatting a second time gives:
Fixing this bug should fix dotnet/razor#6001 and dotnet/razor#5676