diff --git a/CHANGELOG.md b/CHANGELOG.md index ca72b3a..5a98f87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ No unreleased changes. - Added `AbstractTestCase::getFixtureContents()`, which returns the contents of a fixture file. +### Changed + +- Simplified some code. + ### Fixed - Got `AbstractTestCaseTest` working 🤦‍♂️ diff --git a/src/CssMinifier.php b/src/CssMinifier.php index 18394d6..502640a 100644 --- a/src/CssMinifier.php +++ b/src/CssMinifier.php @@ -43,7 +43,8 @@ private function replace( public function removeSuperfluousWhitespaceFilter(string $css): string { // Normalize newlines. - $css = str_replace(["\r\n", "\r", "\n"], "\n", $css); + /** @var string */ + $css = preg_replace('~\R~', "\n", $css); // Normalize horizontal whitespace. $css = str_replace("\t", ' ', $css);