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

Razor formatting in vs code adds \n to each code line. #5589

Closed
vchirikov opened this issue Oct 9, 2021 · 4 comments · Fixed by #10802
Closed

Razor formatting in vs code adds \n to each code line. #5589

vchirikov opened this issue Oct 9, 2021 · 4 comments · Fixed by #10802
Assignees
Labels
bug Something isn't working vscode

Comments

@vchirikov
Copy link

Describe the bug:

bug

Razor formatting in vs code adds \n to each code line.

I can't reproduce this in a small repo, but if you want to check something I can help with it

Version used:

Razor.VSCode version 6.0.0-preview.5.21358.6
ms-dotnettools.csharp-1.23.16
omnisharp 1.37.17-beta.6

To reproduce:
Steps to reproduce the behavior:

  1. Create razor file
  2. Enable razor formatting ( "razor.format.enable": true, "[aspnetcorerazor]": { "editor.defaultFormatter": "ms-dotnettools.csharp" )
  3. Use format in a razor file

*Expected behavior:

Code is formatted

Actual behavior:

Formatting adds line endings to each line

#4358

cc: @NTaylorMullen

@ghost ghost added the untriaged label Oct 9, 2021
@vchirikov
Copy link
Author

and by the way highlighting of the code is broken

@NTaylorMullen NTaylorMullen added bug Something isn't working vscode labels Oct 14, 2021
@NTaylorMullen NTaylorMullen added this to the 17.1 Candidates milestone Oct 14, 2021
@ghost ghost removed the untriaged label Oct 14, 2021
@NTaylorMullen NTaylorMullen modified the milestones: 17.1 Candidates, Backlog Oct 14, 2021
@JohnGalt1717
Copy link

Also seeing this. Format document adds a ton of extra lines in the @code section

@Franklin89
Copy link

I am also having this issue!
This is still happening. Any idea how to solve this? It reallly reallllllly annoying!

@ryzngard ryzngard removed this from the Backlog milestone May 1, 2024
@ryzngard
Copy link
Contributor

ryzngard commented May 1, 2024

Don't mind me, I'm just fighting with the bot...

Adding back to untriaged. It looks like this was incorrectly removed and hasn't been assigned. In the meantime, since this is old, updated information would be helpful.

What version of the extension are you hitting this with?
Can you provide an example repo?
What operating system are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vscode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants