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

[Bug] Spaces between words removed when minifying HTML #178

Open
w4tchdoge opened this issue Nov 20, 2023 · 4 comments
Open

[Bug] Spaces between words removed when minifying HTML #178

w4tchdoge opened this issue Nov 20, 2023 · 4 comments
Assignees
Labels
Type: Bug Something isn't working as expected.

Comments

@w4tchdoge
Copy link

🐞 Bug Report

Describe the bug

When minifying HTML in VSCode, the extension removes the space separating a bolded word from a non-bolded word.

e.g.

<div>
    <p><b>Summary:</b></p>
    <p>Lorem ipsum <b>dolor</b> sit amet</p>
</div>

becomes

<div><p><b>Summary:</b></p><p>Lorem ipsum <b>dolor</b>sit amet</p></div>

Is this a regression?

I am unsure if a previous version also behaved like this as I have only started using this extension very recently.


To Reproduce

  1. Run the Minify the selected text command on HTML similar to the example given above.

Expected behaviour

The Space between a bolded word and a non-bolded word is not removed.


Your environment

(Infomation is taken from the VSCode About section accessed from Help → About)

  • Version: 1.84.2 (user setup)
  • Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e
  • Date: 2023-11-09T10:51:52.184Z
  • Electron: 25.9.2
  • ElectronBuildId: 24603566
  • Chromium: 114.0.5735.289
  • Node.js: 18.15.0
  • V8: 11.4.183.29-electron.0
  • OS: Windows_NT x64 10.0.19045

@w4tchdoge w4tchdoge added the Type: Bug Something isn't working as expected. label Nov 20, 2023
Copy link

welcome bot commented Nov 20, 2023

Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers!

@Mis1eader-dev
Copy link

Noticed this on my side as well. I'll have to serve HTML files as is without minification until this issue is fixed.
Will see if I can come up with a fix myself.

@KorbinPerry
Copy link

KorbinPerry commented Feb 29, 2024

This is happening with <strong> and <a> elements as well, from my experience so far.

@aipungggi
Copy link

aipungggi commented Mar 15, 2024

For XML Files this happens too for example this line

<SelectionItemFormat>Code &amp;gt;= myText</SelectionItemFormat>

turns to

<SelectionItemFormat>Code &amp;gt;=myText</SelectionItemFormat>

it should not remove the space char inside the Element ..it removed right before myText

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

No branches or pull requests

5 participants