postcss-url
Advanced tools
Comparing version 1.2.3 to 1.3.0
@@ -0,1 +1,6 @@ | ||
# 1.3.0 - 2015-01-26 | ||
- Changed: SVGs are now in plain text (not base64 encoded) ([3c04f7a](3c04f7abb1c017dfef34d3ddb00a5b44d8af951f), [#18](https://github.com/postcss/postcss-url/issues/18)) | ||
- Fixed: URLs with hashes (e.g. SVG fragments) are now ignored ([c3a9abc](c3a9abcbed33ede323e7dcd670v8b8fdb6168462f), [#20](https://github.com/postcss/postcss-url/pull/20)) | ||
# 1.2.3 - 2015-01-10 | ||
@@ -2,0 +7,0 @@ |
14
index.js
@@ -7,2 +7,4 @@ /** | ||
var mime = require("mime") | ||
var url = require("url"); | ||
var SvgEncoder = require("directory-encoder/lib/svg-uri-encoder.js") | ||
var reduceFunctionCall = require("reduce-function-call"); | ||
@@ -36,3 +38,3 @@ | ||
/** | ||
* Processes one delcaration | ||
* Processes one declaration | ||
* | ||
@@ -61,2 +63,8 @@ * @param {Object} decl | ||
// ignore hashes | ||
var link = url.parse(value); | ||
if (link.hash) { | ||
return createUrl(quote, value); | ||
} | ||
var newPath = value | ||
@@ -147,2 +155,6 @@ | ||
} | ||
else if (mimeType === "image/svg+xml") { | ||
var svg = new SvgEncoder(file) | ||
newPath = svg.encode() | ||
} | ||
else { | ||
@@ -149,0 +161,0 @@ file = fs.readFileSync(file) |
{ | ||
"name": "postcss-url", | ||
"version": "1.2.3", | ||
"version": "1.3.0", | ||
"description": "PostCSS plugin to rebase or inline on url().", | ||
@@ -36,3 +36,4 @@ "keywords": [ | ||
"postcss-import": "^2.0.0", | ||
"tape": "^3.0.0" | ||
"tape": "^3.0.0", | ||
"directory-encoder": "^0.6.1" | ||
}, | ||
@@ -39,0 +40,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10099
178
6