Skip to content

Commit

Permalink
Merge pull request phoenixframework#1614 from hamann/fix-digester-for…
Browse files Browse the repository at this point in the history
…-compressed-css

Fix regex to match urls in compressed stylesheets
  • Loading branch information
josevalim committed Mar 28, 2016
2 parents 2920beb + c1f29d3 commit 1250f6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/phoenix/digester.ex
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ defmodule Phoenix.Digester do
end
end

@stylesheet_url_regex ~r{(url\(\s*)(\S+)(\s*\))}
@stylesheet_url_regex ~r{(url\(\s*)(\S+?)(\s*\))}
@quoted_text_regex ~r{\A(['"])(.+)\1\z}

defp digest_asset_references(file, manifest) do
Expand Down
4 changes: 4 additions & 0 deletions test/fixtures/digest/priv/static/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
.absolute_url_logo {
background-image: url(http://www.phoenixframework.org/absolute.png);
}

.absolute_path_logo{background-image:url(/phoenix.png)}
.relative_path_logo{background-image:url(../images/relative.png)}
.absolute_url_logo{background-image:url(http://www.phoenixframework.org/absolute.png)}

0 comments on commit 1250f6d

Please sign in to comment.