matthiasmullie / minify

CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.
https://matthiasmullie.github.io/minify/
MIT License
1.96k stars 310 forks source link

Don't strip semicolons after closing parentheses #333

Open pcfreak30 opened 4 years ago

pcfreak30 commented 4 years ago

The regex to clean up semi-colons does not take into account that it may be after a function call.

A small sample from an already minified bundle is break"!==n(););},Ur). Adding a negative lookbehind fixes this.

obedparla commented 3 years ago

@pcfreak30 sup man 😄