Skip to content

Razor formatting wrong for components nested in ChildContent and @{ } block. #8229

@LunicLynx

Description

@LunicLynx

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions