diff --git a/common/framework/Formatter.php b/common/framework/Formatter.php index 975ae97a4..e06bd85a0 100644 --- a/common/framework/Formatter.php +++ b/common/framework/Formatter.php @@ -387,7 +387,7 @@ class Formatter // Convert all paths in LESS and SCSS imports, too. $dirname = dirname($filename); $import_type = ends_with('.scss', $filename) ? 'scss' : 'normal'; - $content = preg_replace_callback('/@import\s+([^\r\n]+)?;/', function($matches) use($dirname, $filename, $target_filename, $import_type, &$imported_list, &$imported_urls) { + $content = preg_replace_callback('/@import\s+((?:url\([^)]+\)|"[^"]+"|\'[^\']+\')[^;]*);/', function($matches) use($dirname, $filename, $target_filename, $import_type, &$imported_list, &$imported_urls) { if (preg_match('!^url\([\'"]?((?:https?:)?//[^()\'"]+)!i', $matches[1], $urlmatches)) { $imported_urls[] = $urlmatches[1];