Quantcast
Channel: ajaxmin Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 683

Edited Unassigned: Regular expression without semicolon end of line breaks minification [21680]

$
0
0
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 **

released


Viewing all articles
Browse latest Browse all 683

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>