renatomarinho / laravel-page-speed

Package to optimize your site automatically which results in a 35%+ optimization
MIT License
2.42k stars 279 forks source link

Repeated white space in string literals removed by CollapseWhitespace #129

Closed agwidarsito closed 3 years ago

agwidarsito commented 4 years ago

Detailed description

If you have a Javascript string that has two spaces within it, such as the following below, then CollapseWhitespaces will remove it.

let myString = 'hello world'; //there are double spaces here

Spaces within strings should be preserved as they're often there for a reason.

Context

This change is important because strings are literals and should not be altered by post processors.

Your environment

Version: PHP 7.2 Library version: 1.18.13

joaorobertopb commented 3 years ago

Please, use version 2.0. Thanks!