When aggregating it appends ';\n' (semicolon and newline) after each file to seperate the scripts. This will fail if the last line is an unclosed comment.
Eg. Krumo from the devel module: devel/krumo/krumo.js ends with a line of //////////////////////////

Fix is to append '\n;\n' (newline semicolon newline) so a comment line won't comment out the semicolon.

CommentFileSizeAuthor
drupal_build_js_cache.patch914 bytesLiam Mitchell

Comments

dddave’s picture

drupal_build_js_cache.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, drupal_build_js_cache.patch, failed testing.

nod_’s picture

Status: Needs work » Closed (won't fix)

Generally we don't babysit broken code. Ending a JS file with a comment isn't a very smart move to begin with. If concatenation is enabled it should be given minified scripts to be more effective.