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

MinifyAll not deleting spaces in JSON arrays #54

Open
AdrianCarreno opened this issue Oct 29, 2020 · 11 comments
Open

MinifyAll not deleting spaces in JSON arrays #54

AdrianCarreno opened this issue Oct 29, 2020 · 11 comments
Assignees
Labels
Type: Bug Something isn't working as expected.

Comments

@AdrianCarreno
Copy link

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
Copy link

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

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

@Josee9988
Copy link
Owner

Hi, I will check it tomorrow! Thanks for contributing

@Josee9988
Copy link
Owner

Josee9988 commented Oct 30, 2020

@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
Copy link
Owner

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

@Josee9988
Copy link
Owner

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
Copy link
Author

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.

  • Array formatted beautifully doesn't delete the spaces, but it's a one line string:
    spaces
  • Same array, but with no indentation deletes only a few line breaks, but leaves most of the rest.
    line breaks

@Josee9988
Copy link
Owner

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

@AdrianCarreno
Copy link
Author

It's the same
ezgif com-gif-maker

@Josee9988
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

I will try it on windows aswell

@Josee9988 Josee9988 transferred this issue from Josee9988/MinifyAll Feb 23, 2021
@Josee9988 Josee9988 added the bug label Apr 11, 2021
@settings settings bot removed the bug label May 31, 2021
@Josee9988 Josee9988 added the Type: Bug Something isn't working as expected. label May 31, 2021
@Josee9988 Josee9988 self-assigned this May 31, 2021
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

2 participants