mirror of
https://github.com/matthiasmullie/minify.git
synced 2025-02-24 03:35:30 +01:00
Collapse multiple semicolons
This commit is contained in:
parent
f54f58d8b1
commit
e58caad5b7
@ -265,6 +265,9 @@ class JS extends Minify
|
||||
*/
|
||||
$content = preg_replace('/;\}/s', '}', $content);
|
||||
|
||||
// get rid of double semicolons
|
||||
$content = preg_replace('/;+/', ';', $content);
|
||||
|
||||
// get rid of remaining whitespace af beginning/end, as well as
|
||||
// semicolon, which doesn't make sense there: ASI will kick in here too
|
||||
return trim($content, "\n ;");
|
||||
|
Loading…
x
Reference in New Issue
Block a user