Skip to content

Indentation broken in razor files #11117

@vsfeedback

Description

@vsfeedback

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


[regression] [worked-in:17.12 preview 2]
Since 17.12 preview 3 or 4, razor files are constantly being autoformatted incorrectly.

While typing C# in the @code block, all components in the file will have their indentation changed sporadically. Indentation will change from this:

<InputText Param1="true"
           Param2="some text"
           Param3="Some.Enum" />

to this:

<InputText Param1="true"
Param2="some text"
Param3="Some.Enum" />

This autoformatting seems to be triggered when typing ; or } characters.

Currently my only way around this issue is to write some code, select it all and copy it to the clipboard, ctrl+z everything, and paste the code back (the auto format doesn't appear to ever trigger on paste).


Original Comments

Feedback Bot on 10/28/2024, 06:49 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions