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
Uncaught SyntaxError: Unexpected token * with comments at the end of a file #35
Comments
I can't reproduce this issue - I tried minifying the above example and it seemed to do so correctly. |
I tried to minify Bootstrap Toggle (http://www.bootstraptoggle.com) and holder.js (http://imsky.github.io/holder). With the current master i get a different error: "Uncaught SyntaxError: Unexpected identifier". It seems that not all comments are removed in this file. Minified file: http://www.file-upload.net/download-10261212/scripts.js.html |
It took me awhile to figure out what went wrong here. I couldn't reproduce it as my IDE keeps adding an empty newline at the end of every file. Anyway: when a script ends in a single-line comment & the next script is joined, it doesn't start at a newline, just right behind the previous script. Which results in it being part of the single-line comment, right until the next \n 5d1886a should fix this problem. Released 1.3.18 |
Working perfect. Thank You! |
Theres an issue with comments at the end of a file. For example:
jQuery(document).ready(function($) {
// do your stuff
});
// the bad comment
The last comment is causing an Unexpected token * Syntax Error.
The text was updated successfully, but these errors were encountered: