Skip to content

Commit

Permalink
fixes complex css imports #2958
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Miller <[email protected]>
  • Loading branch information
rhukster committed Jul 8, 2020
1 parent 7f03f7c commit 9b66491
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Reverted `Language::getDefault()` and `Language::getLanguage()` to return false again because of plugin compatibility (updated docblocks)
* Fixed UTF-8 issue in `Excerpts::getExcerptsFromHtml`
* Fixed some compatibility issues with recent Changes to `Assets` handling
* Fixed issue with `CSS_IMPORTS_REGEX` breaking with complex URLs [#2958](https://github.com/getgrav/grav/issues/2958)
1. [](#improved)
* Added ability to `noprocess` specific items only in Link/Image Excerpts, e.g. `http://foo.com/page?id=foo&target=_blank&noprocess=id` [#2954](https://github.com/getgrav/grav/pull/2954)

Expand Down
3 changes: 0 additions & 3 deletions system/src/Grav/Common/Assets/BaseAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ abstract class BaseAsset extends PropertyObject
protected const CSS_ASSET = true;
protected const JS_ASSET = false;

/** @const Regex to match CSS import content */
protected const CSS_IMPORT_REGEX = '{@import(.*?);}';

/** @var string|false */
protected $asset;
/** @var string */
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Assets/Pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Pipeline extends PropertyObject
protected const CSS_SOURCEMAP_REGEX = '{\/\*# (.*?) \*\/}';

/** @const Regex to match CSS import content */
protected const CSS_IMPORT_REGEX = '{@import(.*?);}';
protected const CSS_IMPORT_REGEX = '{@import.*?["\']([^"\']+)["\'].*?;}';

protected const FIRST_FORWARDSLASH_REGEX = '{^\/{1}\w}';

Expand Down

0 comments on commit 9b66491

Please sign in to comment.