Josee9988 / MinifyAllCli

πŸ“¦ A lightweight, simple and easy npm tool to π—Ίπ—Άπ—»π—Άπ—³π˜† JSON/C, HTML and CSS! Also known as MinifyAll core! ⭐ Usable as π‘ͺ𝑳𝑰 tool or π’Šπ’Žπ’‘π’π’“π’•π’‚π’ƒπ’π’† in TS/JS as a 𝑴𝑢𝑫𝑼𝑳𝑬 πŸ₯°
https://minifyall.jgracia.es/
BSD 3-Clause "New" or "Revised" License
25 stars 5 forks source link

MinifyAll not deleting spaces in JSON arrays #54

Open AdrianCarreno opened 3 years ago

AdrianCarreno commented 3 years ago

Issue Type: Bug

Just try to minify a number array:

[
    [
        1,
        2,
        3
    ],
    [
        4,
        5,
        6
    ],
    [
        7,
        8,
        9
    ]
]

And it will keep the spaces between numbers. They are not necessary for syntax, and use a lot of space. I tried formatting a GeoJSON and it didn't get to the minimal size. It's annoying to have to use another command (regex in my case) to delete the remaining spaces.

Extension version: 2.4.9 VS Code version: Code 1.50.1 (d2e414d9e4239a252d1ab117bd7067f125afd80a, 2020-10-13T15:06:15.712Z) OS version: Windows_NT x64 10.0.18362

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (8 x 1992)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|7.89GB (2.04GB free)| |Process Argv|--crash-reporter-id f94e7b37-942b-4ff6-b5fb-4d0699e41a01| |Screen Reader|no| |VM|0%|
issue-label-bot[bot] commented 3 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.88. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Josee9988 commented 3 years ago

Hi, I will check it tomorrow! Thanks for contributing

Josee9988 commented 3 years ago

@AdrianCarreno the result the minifier gave me is: [[1,2,3],[4,5,6],[7,8,9]].

So for me it is working perfectly.

Video evidence

Josee9988 commented 3 years ago

To try it again, please, reinstall the extension or try it in a different environment.

Josee9988 commented 3 years ago

I was thinking and... maybe you are minifying this json code as other language such as HTML.

Make sure the file that you are minifying ends with .json or .jsonc and VSCode detects it as so at the bottom right corner.

AdrianCarreno commented 3 years ago

I tried reinstalling the extension and the problem persists. I noticed that depending on how is formatted the original string, the output will be different.

Josee9988 commented 3 years ago

Wow that's weird. Could u try to save the file before minifying?

AdrianCarreno commented 3 years ago

It's the same ezgif com-gif-maker

Josee9988 commented 3 years ago

I tried again video evidence v2

Peek 2020-10-30 19-59

It is so weird, I've been trying off-camera and nothing weird happened. I don't think this is a MinifyAll issue, and maybe it has something to do with node or VSCode.

Could you try to disable all extensions to see if any other extension is interfering with MinifyAll?

Thanks!!!

AdrianCarreno commented 3 years ago

All the previous test were done in my work PC. Now I'm home and tried with my personal PC and got the same result. It's a fresh install of windows (I formatted last weekend), so everything is up to date. I tried with all the extensions disabled, and the problem persists.

ezgif com-gif-maker

Maybe you have something else that makes it work properly?

Extension version: 2.4.9 VS Code version: Code 1.50.1 (d2e414d9e4239a252d1ab117bd7067f125afd80a, 2020-10-13T15:06:15.712Z) OS version: Windows_NT x64 10.0.19042

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2592)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.88GB (9.77GB free)| |Process Argv|--crash-reporter-id 6c12de3b-4208-468b-ac95-c6e04023b060| |Screen Reader|no| |VM|0%|
Josee9988 commented 3 years ago

I will try it on windows aswell