diff --git a/src/Assetic/Util/CssUtils.php b/src/Assetic/Util/CssUtils.php index ebc44b031..8c4e45147 100644 --- a/src/Assetic/Util/CssUtils.php +++ b/src/Assetic/Util/CssUtils.php @@ -22,7 +22,7 @@ abstract class CssUtils const REGEX_IMPORTS = '/@import (?:url\()?(\'|"|)(?P[^\'"\)\n\r]*)\1\)?;?/'; const REGEX_IMPORTS_NO_URLS = '/@import (?!url\()(\'|"|)(?P[^\'"\)\n\r]*)\1;?/'; const REGEX_IE_FILTERS = '/src=(["\']?)(?P.*?)\\1/'; - const REGEX_COMMENTS = '/(\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)/'; + const REGEX_COMMENTS = '/(?:("|\')[^\/]*\/+\*[^"\s]*\1)\K|(\/\*(?:[^\/][^*]*\*+)*\/)/'; /** * Filters all references -- url() and "@import" -- through a callable.