Comments (5)
A problem I have had historically is that if one of my tools accepts code that is badly written, then it is assumed that 'I' am approving, which I am not. That is why made that change in 2012. Up until now, no one has complained.
There is a lot of stupid stuff happening in that highcharts code, but I am past caring about it. JSMin will now accept it.
from jsmin.
Thanks for looking. The "badly written" code here is output from minification, not meant for human consumption. Highcharts source happens to look friendlier:
if (/(NaN| {2}|^$)/.test(value)) {
value = 'M 0 0';
}
(and minifies fine w/ JsMin).
Ugliness or other badness aside, as far as I can tell, the JsMin input here is valid ES 3 and the output is not. We have an easy workaround for this one, but we believe this hits many codebase files that are not highcharts.
I didn't realize JsMin was being maintained, and we have seen the usage warning/caveats, but I filed this in case someone else is searching around. Will post a fix if we make one.
(Of course we shouldn't be passing pre-minified code through JsMin anyway; that's a future fix.)
from jsmin.
Some simplified failure cases:
;/a# b/;
-->;/a#b/;
;/a| b/;
-->;/a|b/;
;/# /;
-->;/#/;
;/| /;
--> Error: Unterminated regular expression at line 0 and column 7
The leading semicolon seems to be significant.
from jsmin.
I think this is fixed in the latest.
Why are you minifying minified code?
from jsmin.
Confirmed all our cases are resolved. I didn't notice changes went in, thanks for looking.
The double minification fix is planned.
from jsmin.
Related Issues (18)
- Unterminated Regular Expression Error except when comment on next line HOT 4
- Unrecognized Regex Literals HOT 1
- Feedback on License comments HOT 2
- c++ streambuf implementation HOT 1
- Any way to optimize Firefox JS files? HOT 3
- Broken link on documentation site HOT 2
- JSmin removed spaces after literals in strings. HOT 14
- Jsmin doesn't treat backtick strings as strings HOT 6
- use_2to3 is invalid HOT 2
- Can we tag a release? HOT 1
- Over eager removal of whitespace HOT 4
- Preserve important comments e.g. copyright/ license information HOT 1
- JSMin gives error when parsing a specific string HOT 2
- Linefeeds in Javascript Strings HOT 1
- Licensing issues HOT 5
- Regex: / /g seems to be replaced by //g HOT 1
- Unary Plus operator (+) to convert boolean to number, preceded by addition operator causes JS syntax error HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsmin.