Skip to content

Wrong indentation in .razor files if there is a RenderFragment #9254

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


For example, create this Asp.Net Blazor page:

@page "/"
@code
{
	void T()
	{
		S("first"
			+ "second"
			+ "third");
	}

string[] S(string s) =>
		s.Split(',')
		. Select(s => s.Trim())
		. ToArray();

RenderFragment R => @<div></div>;
}

When the file is formatted (Ctrl+K,Ctrl+D), some lines are shifted to the left. If you format it again, they are shifted to the right. If you format it again, they are shifted to the left...
Every time I commit to Git, there are too many modified lines.


Original Comments

Feedback Bot on 8/20/2023, 06:59 PM:

(private comment, text removed)


Original Solutions

(no solutions)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions