Skip to content
This repository was archived by the owner on Mar 19, 2023. It is now read-only.

C-style JavaScript comments without a line break at the end of a file... #71

Open
sebastien-fauvel opened this issue Nov 30, 2015 · 0 comments

Comments

@sebastien-fauvel
Copy link

...break the minified version when prepended to another file.

I've had this issue with qtip.min.js:

/* qTip2 v2.2.1 | Plugins: tips viewport imagemap svg modal ie6 | Styles: core basic css3 | qtip2.com | Licensed MIT | Sat Sep 06 2014 18:25:06 */

!function(a,b,c){/* Their code here... */}(window,document);
//# sourceMappingURL=//cdn.jsdelivr.net/qtip2/2.2.1//var/www/qtip2/build/tmp/tmp-656464emu9s/jquery.qtip.min.map

They're missing a trailing line break (which is ok), but when you combine it to other files and minify, the output is broken – the first line of code from the next file is missing. I think we should simply "sanitize" input files by adding a trailing line break if missing. Any objection?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant