From 98fb622bac45c2af96b957c7facaaba6cc1ebbf1 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Wed, 27 Apr 2016 16:17:34 +0200 Subject: [PATCH] Make sure there's an end of line after each file added to the pipeline (#806) Fixes an issue with files ending with a line comment, but no new line. Also fixes (in a case I found) the already-seen JSMin fatal issue with "Regex not terminated" error. --- system/src/Grav/Common/Assets.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Assets.php b/system/src/Grav/Common/Assets.php index 55b19e63c..dc72102a1 100644 --- a/system/src/Grav/Common/Assets.php +++ b/system/src/Grav/Common/Assets.php @@ -1114,7 +1114,8 @@ class Assets $file = $this->cssRewrite($file, $relative_dir); } - $buffer .= $file; + $file = rtrim($file) . PHP_EOL; + $buffer .= $file; } // Pull out @imports and move to top