es6-css-minify icon indicating copy to clipboard operation
es6-css-minify copied to clipboard

Minify Selection cause an error (incorrect JSON format result)

Open bluedasher13 opened this issue 4 years ago • 0 comments

In a JSON file, if I run the command Minify: Selection:

  • before minified:
{
    "autoload": {
        "psr-4": {
            "App\\something": "app\\something"
        }
    }
}
  • after minified:
{"autoload":{"psr-4":{"App\something":"app\something"}}}
  • expected:
{"autoload":{"psr-4":{"App\\something":"app\\something"}}}

It will cause an error after minified: Invalid escape character in string.

Because the double backslashes \\ has been stripped.

If this extension doesn't support JSON minifying, The Minify: Selection command should be disabled in the JSON editors.

bluedasher13 avatar Apr 04 '21 18:04 bluedasher13