Open tmorton opened 12 years ago
In case anyone was wondering if that JS code is valid, see https://developer.mozilla.org/en/JavaScript/Guide/Values,_Variables,_and_Literals#Using_special_characters_in_strings
Thanks for the report. If jsmin.c handles this and jsmin.rb doesn't, then this is definitely a bug. I don't use or actively maintain this code anymore though, so: pull requests welcome!
JSMin will fail with an "JSMin parse error: unterminated string literal" error on this type of code:
I believe the problem is with the check on lines 157-159. In Crockford's C version, latest master, that check is not there - see https://github.com/douglascrockford/JSMin/blob/master/jsmin.c