Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline error #2

Closed
sigmaprojects opened this issue Apr 14, 2012 · 5 comments
Closed

Multiline error #2

sigmaprojects opened this issue Apr 14, 2012 · 5 comments

Comments

@sigmaprojects
Copy link

JSMin will fail on strings like so:
var foo = ' bar
these
are \
new lines';
A test case (and how I came across this issue) was trying to minify this library: http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/
Tried both the packages (minified / dev) with the same result - Though manually editing the library and concatenating all the \ instances fixes it, but that's not ideal.

The error is correctly thrown on line 189 of JSMin.java

Maybe if JSMin can't fix this by itself, have it include the js file without trying to minify it?

@lmajano
Copy link
Member

lmajano commented Apr 15, 2012

So should it remove the /?

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
www. luismajano.com
www.coldbox.org
www.gocontentbox.org
P/F: 1-888-557-8057
Cell: 1-909-248-3408

On Sunday, April 15, 2012 at 1:20 AM, Don Quist wrote:

JSMin will fail on strings like so:
var foo = ' bar
these
are \
new lines';
A test case (and how I came across this issue) was trying to minify this library: http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/
Tried both the packages (minified / dev) with the same result - Though manually editing the library and concatenating all the \ instances fixes it, but that's not ideal.

The error is correctly thrown on line 189 of JSMin.java

Maybe if JSMin can't fix this by itself, have it include the js file without trying to minify it?


Reply to this email directly or view it on GitHub:
#2

@sigmaprojects
Copy link
Author

That would be nice, and I would prefer it that way - but it could also break some things that rely on parsing strings by new lines...

@lmajano
Copy link
Member

lmajano commented Apr 18, 2012

So what could be the solutions?

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano

On Apr 18, 2012, at 3:15 AM, Don [email protected] wrote:

That would be nice, and I would prefer it that way - but it could also break some things that rely on parsing strings by new lines...


Reply to this email directly or view it on GitHub:
#2 (comment)

@bdw429s
Copy link

bdw429s commented Aug 11, 2012

You need to include the latest from Douglas Crockford's original C implementation that the Java port is based off of.
https://github.com/douglascrockford/JSMin/blob/master/jsmin.c
From what I've read online, he's fixed this issue already.

@lmajano
Copy link
Member

lmajano commented Sep 12, 2013

Is this still an issue?

@lmajano lmajano closed this as completed Sep 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants