Josee9988 / MinifyAll

A 𝗩𝗦𝗖𝗼𝗱𝗲 𝗺𝗢𝗻𝗢𝗳𝗢𝗲𝗿 for JS, JSON/C, CSS, and HTML, you will love its simplicity! 🌟 π˜Ύπ™€π™’π™₯π™§π™šπ™¨π™¨ and π™œπ™―π™žπ™₯ files and folders πŸ“¦ Reduce your bundle and file sizes with lightning speed ⚑
https://minifyall.jgracia.es/
GNU General Public License v3.0
71 stars 10 forks source link

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

Open w4tchdoge opened 8 months ago

w4tchdoge commented 8 months ago

🐞 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)


welcome[bot] commented 8 months ago

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 commented 5 months ago

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 commented 4 months ago

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

aipungggi commented 4 months ago

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