minify
minify copied to clipboard
template literals and handling of missing semi-colons
When normal JS vars are on separate lines with missing semi-colons, they are left on separate lines, but when using template literals the line-break is removed resulting in broken JS.
JS in;
// template literals without semicolons
var foo = `Hello`
foo = `world`
// template literals with semicolons
var foo = `Hello`;
foo = `world`;
// Simple strings without semicolons
var foo = 'Hello'
foo = 'world'
JS out:
var foo=`Hello`foo=`world`var foo=`Hello`;foo=`world`;var foo='Hello'
foo='world';
you are reporting to the wrong project. I think you need to report "mrclay/jsmin-php":
- https://github.com/mrclay/minify/blob/3.0.10/composer.json#L37
Yes and no; it was already reported over a year ago but got not response. As minify uses jsmin-php and as both are by the same original author and as there is more activity here, I hoped reporting in miniy would result in someone seeing it. That, at least, has been accomplished. Would appreciate your help! :-)
I don't think neither of them is active. but I can accept your pull request, or pull request to add support for some other minifier library :P
and you should cross-link that other PR here and included your secret agenda in issue details that you found no luck there.