From 59dd0d1212cd1725e6accab143da016f3e8f033c Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Tue, 28 Nov 2017 06:12:33 +0200 Subject: [PATCH] Fixed CSS Pipeline failing with Google remote fonts if the file was minified (#1261) (#1763) * Fixed CSS Pipeline failing with Google remote fonts if the file was minified (#1261) * Assets: Make tag check ungreedy again -- inline js may have tags in the content --- CHANGELOG.md | 1 + system/src/Grav/Common/Assets.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1124e2b3..3a9312842 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ * Remove support for `config.user`, it was broken and bad practise * Make sure that `clean cache` uses valid path [#1745](https://github.com/getgrav/grav/pull/1745) * Fixed token creation issue with `Uri` params like `/id:3` + * Fixed CSS Pipeline failing with Google remote fonts if the file was minified [#1261](https://github.com/getgrav/grav-plugin-admin/issues/1261) # v1.3.8 ## 10/26/2017 diff --git a/system/src/Grav/Common/Assets.php b/system/src/Grav/Common/Assets.php index 47c76849c..0399895f0 100644 --- a/system/src/Grav/Common/Assets.php +++ b/system/src/Grav/Common/Assets.php @@ -35,11 +35,15 @@ class Assets const CSS_URL_REGEX = '{url\(([\'\"]?)(.*?)\1\)}'; /** @const Regex to match CSS sourcemap comments */ - const CSS_SOURCEMAP_REGEX = '{\/\*# (.*) \*\/}'; + const CSS_SOURCEMAP_REGEX = '{\/\*# (.*?) \*\/}'; /** @const Regex to match CSS import content */ - const CSS_IMPORT_REGEX = '{@import(.*);}'; + const CSS_IMPORT_REGEX = '{@import(.*?);}'; + /** + * @const Regex to match