Skip to content

Commit

Permalink
fixed #2: Detect @font-face urls()
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jun 10, 2013
1 parent 29576ff commit 688fe54
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function annotateUrls(tree) {
case "stylesheet": return iterateChildren();
case "ruleset": return iterateChildren();
case "block": return iterateChildren();
case "atruleb": return iterateChildren();
case "declaration": return iterateChildren();
case "value": return iterateChildren();
case "uri":
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "css-loader",
"version": "0.6.0",
"version": "0.6.1",
"author": "Tobias Koppers @sokra",
"description": "css loader module for webpack",
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions test/urlTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ describe("url", function() {
["\".class { background: green url( \"+require(\"./img.png\")+\" ) xyz }\""]);
test("background img 2", ".class { background: green url(~img/png ) url(aaa) xyz }",
["\".class { background: green url(\"+require(\"img/png\")+\" ) url(\"+require(\"./aaa\")+\") xyz }\""]);
test("font face", "@font-face { src: url(regular.woff) format('woff'), url(~truetype/regular.ttf) format('truetype') }",
["\"@font-face { src: url(\"+require(\"./regular.woff\")+\") format('woff'), url(\"+require(\"truetype/regular.ttf\")+\") format('truetype') }\""]);
testMinimize("minimized simple", ".class { a: b c d; }",
["\".class{a:b c d}\""]);
});

0 comments on commit 688fe54

Please sign in to comment.