iosrockstar / jquery-jsonp

Automatically exported from code.google.com/p/jquery-jsonp
0 stars 0 forks source link

JSMin parse error: unterminated regular expression literal For line 36 #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run JSMin OR run the asset_hat ruby gem 

What is the expected output? What do you see instead?

I am using the asset hat ruby gem to concatenate and minify my scripts. JSMin 
was failing on JSONP because of an unterminated regular expression on line 36

ORIGINAL CODE:
// Give joining character given url
function qMarkOrAmp( url ) {
  return /\?/ .test( url ) ? "&" : "?";
}

MY PATCH
// Give joining character given url
function qMarkOrAmp( url ) {
  return /(\?)/ .test( url ) ? "&" : "?";
}

I updated the source into a REGEX grouping and JSMin performed successfully. 
Please consider making this change to the source so that other projects can run 
JSONP through a static asset minifier that uses JSMin.

Thank you,
caltman@emcien.com

Original issue reported on code.google.com by calt...@emcien.com on 21 Jul 2011 at 3:58

GoogleCodeExporter commented 8 years ago
I think you should file a bug against JSMin regarding this. If they take too 
much time to fix the issue, I'll consider adding a temporary fix, though I'd 
prefer to avoid that.

Original comment by jul...@creative-area.net on 21 Jul 2011 at 4:05

GoogleCodeExporter commented 8 years ago
Any news on this JSMin-side?

Original comment by jul...@creative-area.net on 12 Dec 2011 at 4:16

GoogleCodeExporter commented 8 years ago

Original comment by jul...@creative-area.net on 12 Dec 2011 at 4:20

GoogleCodeExporter commented 8 years ago

Original comment by jul...@creative-area.net on 13 Jan 2012 at 9:27