When merging JavaScript files, drupal_build_js_cache separates files with a semicolon. However, this is not always sufficient, particularly in the case that one or more javascript files do not have trailing newlines. For example, if the following two JavaScript files are concatenated, there will be an error processing the result:
--File One--
...
//last line of file has a comment, and there is no trailing newline
--File Two--
/* File starts off with a multiline comment
...
The result is that the first line of file two will be appended to the last line of file one, and the /* comment start will be missed, causing likely parse errors afterwards.
Patch to follow.
Comments
Comment #1
jbafford commentedComment #2
c960657 commentedTrue. It will also make the aggregated files slightly easier to read.
Comment #3
dries commentedCommitted to CVS HEAD. Thanks.
Comment #4
gábor hojtsyCommitted, thanks.