Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting issues with @section blocks and code following them #6804

Closed
davidwengier opened this issue Sep 8, 2022 · 2 comments
Closed

Formatting issues with @section blocks and code following them #6804

davidwengier opened this issue Sep 8, 2022 · 2 comments
Assignees
Labels
bug Something isn't working ✔️ resolution: fixed
Milestone

Comments

@davidwengier
Copy link
Contributor

davidwengier commented Sep 8, 2022

Running latest VS Studio 2022 as of 2022/09/08 version 17.3.3.
Still getting strange cshtml formatting with 'ctrl + k' then 'ctrl + d' to format the current document.

when the html is first and the @Sections are placed below the first @section gets formatted correctly, where any that follow or html that follow bellow those @Sections get messed up indentation.

Before updating to 17.3.3 I had 17.1.* and formatting worked fine then

(tried inputting example code to show what i mean but the formatting gets messed up when i try paste in here

Have a epic day!

Originally posted by @nastro1995 in #4358 (comment)

what is strange all tags have a closing pair, even in _Layout. and all needed closing braces are there to.

Expected 1
expected 1

Actual 1
wrong-auto-formatting 1

Expected 2
expected 2

Actual 2
wrong-auto-formatting 2

@ghost ghost added the untriaged label Sep 8, 2022
@davidwengier
Copy link
Contributor Author

There have been a lot of improvements to formatting of @section directives, so need to check if this still repros. The lack of a blank line between the @section blocks could be an issue, as i don't think I've seen that specific scenario reported before.

@arunchndr arunchndr added bug Something isn't working and removed untriaged labels Sep 8, 2022
@ghost ghost added the untriaged label Sep 8, 2022
@arunchndr arunchndr added this to the 17.4-Preview3 CC:~9/29 milestone Sep 8, 2022
@ghost ghost removed the untriaged label Sep 8, 2022
@davidwengier
Copy link
Contributor Author

Confirmed this repros in 17.3 but is fixed in 17.4 Preview by one or all of #6030, #6402 and #6531

@ghost ghost locked as resolved and limited conversation to collaborators Oct 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working ✔️ resolution: fixed
Projects
None yet
Development

No branches or pull requests

2 participants