[Rt-commit] rt branch, 4.4/js-concat-newline, created. rt-4.4.1-291-g3c4cd86
Brian Duggan
brian at bestpractical.com
Thu Jan 26 11:42:30 EST 2017
The branch, 4.4/js-concat-newline has been created
at 3c4cd86fcebcfb2c7ef48863030da23725381560 (commit)
- Log -----------------------------------------------------------------
commit 3c4cd86fcebcfb2c7ef48863030da23725381560
Author: Brian C. Duggan <brian at bestpractical.com>
Date: Thu Jan 26 11:34:40 2017 -0500
Append newline after concatenating each JS file
Append a newline after each concatenated JS file. Applies before
minification.
This change prevents a '//' comment at the end of a JS file without
its own newline from gobbling up code in the first line of the next JS
file.
Fixes: I#32539
diff --git a/lib/RT/Squish/JS.pm b/lib/RT/Squish/JS.pm
index 4ec8f98..4091c83 100644
--- a/lib/RT/Squish/JS.pm
+++ b/lib/RT/Squish/JS.pm
@@ -81,7 +81,7 @@ sub Squish {
my $res = RT::Interface::Web::Handler->GetStatic($uri);
if ($res->is_success) {
- $content .= $res->decoded_content;
+ $content .= $res->decoded_content . "\n";
} else {
RT->Logger->error("Unable to fetch $uri for JS Squishing: " . $res->status_line);
next;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list