We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f9dee5 commit 982521dCopy full SHA for 982521d
Plugin/SpeedOptimizer.php
@@ -3,7 +3,7 @@
3
* @Author: nguyen
4
* @Date: 2020-02-12 14:01:01
5
* @Last Modified by: Alex Dong
6
- * @Last Modified time: 2021-02-08 23:32:57
+ * @Last Modified time: 2021-05-14 12:11:50
7
*/
8
9
namespace Magepow\SpeedOptimizer\Plugin;
@@ -322,7 +322,7 @@ public function minifyJs($script)
322
{
323
$regex = '~//?\s*\*[\s\S]*?\*\s*//?~'; // RegEx to remove /** */ and // ** **// php comments
324
$search = array(
325
- '/(?:(?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:(?<!\:|\\\|\')\/\/.*))/',
+ '/(?:(?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:(?<!\:|\\\|\') \/\/.*))/',
326
'/(\s)+/s', // shorten multiple whitespace sequences
327
);
328
0 commit comments