Skip to content

Commit

Permalink
Make sure there's an end of line after each file added to the pipeline (
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
flaviocopes authored and rhukster committed Apr 27, 2016
1 parent 9129ce2 commit 98fb622
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion system/src/Grav/Common/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,8 @@ protected function gatherLinks(array $links, $css = true)
$file = $this->cssRewrite($file, $relative_dir);
}

$buffer .= $file;
$file = rtrim($file) . PHP_EOL;
$buffer .= $file;
}

// Pull out @imports and move to top
Expand Down

0 comments on commit 98fb622

Please sign in to comment.