Hi there,
I recently upgraded from version 1.1 (yeah I know...) to 5.1 and found that my minification no longer worked correctly. After playing around a bit I reproduced this with the simplest case I could:
var num = 1;
var regex = /thepattern/
num = 2;
This will produce the following minified result:
var num=1,regex=/thepattern/num=2
It appears to have appended the third line onto the end of the regular expression instead of recognizing it as a new line. I know in an ideal world there would be a semicolon at the end but this is old old code so.. there isn't :-)
Interestingly this worked fine in version 1.1 so something must have changed along the way to change the way this works.
Thanks very much,
Dave A.
EDIT: Interestingly if you use the -analyze switch it doesn't pick up this missing semicolon either, no improper technique warning is thrown.
Comments: ** Comment from web user: ronlo **
I recently upgraded from version 1.1 (yeah I know...) to 5.1 and found that my minification no longer worked correctly. After playing around a bit I reproduced this with the simplest case I could:
var num = 1;
var regex = /thepattern/
num = 2;
This will produce the following minified result:
var num=1,regex=/thepattern/num=2
It appears to have appended the third line onto the end of the regular expression instead of recognizing it as a new line. I know in an ideal world there would be a semicolon at the end but this is old old code so.. there isn't :-)
Interestingly this worked fine in version 1.1 so something must have changed along the way to change the way this works.
Thanks very much,
Dave A.
EDIT: Interestingly if you use the -analyze switch it doesn't pick up this missing semicolon either, no improper technique warning is thrown.
Comments: ** Comment from web user: ronlo **
released