Skip to content

Commit

Permalink
Allow leading space in at-font-face URL function
Browse files Browse the repository at this point in the history
fixes #1440
  • Loading branch information
bsweeney committed Sep 15, 2022
1 parent 66431c5 commit fe4e904
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Css/Stylesheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,7 @@ private function _parse_font_face($str)
{
$descriptors = $this->_parse_properties($str);

preg_match_all("/(url|local)\s*\([\"\']?([^\"\'\)]+)[\"\']?\)\s*(format\s*\([\"\']?([^\"\'\)]+)[\"\']?\))?/i", $descriptors->src, $src);
preg_match_all("/(url|local)\s*\(\s*[\"\']?([^\"\'\)]+)[\"\']?\s*\)\s*(format\s*\(\s*[\"\']?([^\"\'\)]+)[\"\']?\s*\))?/i", $descriptors->src, $src);

$valid_sources = [];
foreach ($src[0] as $i => $value) {
Expand Down

0 comments on commit fe4e904

Please sign in to comment.