sunjw / jstoolnpp

A JavaScript (JSON) tool for Notepad++ (formerly JSMinNpp) and Visual Studio Code.
GNU General Public License v2.0
283 stars 24 forks source link

Spaces between entities are minified #96

Closed grenelt closed 3 years ago

grenelt commented 3 years ago

The whitespace after °

<button id="stepup_x" class="btn">+10&#xB0; &#x27F0;</button>

is being removed by JSMin:

<button id="stepup_x"class="btn">+10&#xB0;&#x27F0;</button>

sunjw commented 3 years ago

Looks right to JSMin algorithm.

grenelt commented 3 years ago

Sorry, took me some time to understand. It's a kind of misusing, because i try to minify files with HTML and CSS code in it. That's because i'm messing arround with MCUs and try to have compact files. But: JSMin removes trailing spaces after semicolons as intended, but doesn't know about the HTML tag. So i think the NP++ plugin should check and isolate the script tag before minifying with JSMin. I know - now it's more of a pull request... ;)