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

[html] Formatting Breaks with Space Between Commented Lines in Script Tag #213628

Open
mortonmills opened this issue May 28, 2024 · 1 comment · May be fixed by #171547
Open

[html] Formatting Breaks with Space Between Commented Lines in Script Tag #213628

mortonmills opened this issue May 28, 2024 · 1 comment · May be fixed by #171547
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities html HTML support issues
Milestone

Comments

@mortonmills
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: Code 1.89.0 (b58957e, 2024-05-01T02:08:25.066Z)
  • OS Version: Linux x64 6.5.0-18-generic

When commenting out sections in a script tag,
the HTML formatting breaks
if there is a line with at least 1 space in between 2 commented out lines.
( Highlighting the following code block may help clarify. )

<script>
    //
 
    //
             </script>

Steps to Reproduce:

  1. Copy and paste the code block shown above into a blank HTML file in vscode.
  2. Format the HTML using the Format Document command ( keyboard shortcut is usually Ctrl + Shift + I ) .
  3. Document will not format
  4. Remove the single space ( not the line ) between the 2 commented out lines.
  5. Format HTML using same method as Step 2.
  6. Document should be formatted.
@vscodenpa
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.89.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@aeschli aeschli added the html HTML support issues label May 29, 2024
@aeschli aeschli added this to the Backlog milestone May 29, 2024
@aeschli aeschli added the bug Issue identified by VS Code Team member as probable bug label May 29, 2024
@johnsoncodehk johnsoncodehk linked a pull request Jun 23, 2024 that will close this issue
35 tasks
@aeschli aeschli added the help wanted Issues identified as good community contribution opportunities label Dec 10, 2024
@aeschli aeschli changed the title HTML Formatting Breaks with Space Between Commented Lines in Script Tag [html] Formatting Breaks with Space Between Commented Lines in Script Tag Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities html HTML support issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants