This code:
<Component1>
@{
RenderFragment fragment =
@<Component1 Id="Comp1"
Caption="Title">
</Component1>;
}
</Component1>
Will be formatted wrong.
After format the Caption attribute will have the wrong indentation.
Note: There are (skipped) tests that cover this scenario in HtmlFormattingTest.cs