postcss-svgo
Advanced tools
Comparing version
@@ -0,1 +1,8 @@ | ||
# 2.0.2 | ||
* Fixed an issue where the module was not handling exceptions from | ||
decoding URLs. | ||
* The module will now convert all SVG wrapping quotes to single quotes, which | ||
is consistent with SVGO's output. | ||
# 2.0.1 | ||
@@ -2,0 +9,0 @@ |
@@ -27,3 +27,8 @@ 'use strict'; | ||
return new Promise(function (resolve, reject) { | ||
var isUriEncoded = decode(decl.value) !== decl.value; | ||
var isUriEncoded = undefined; | ||
try { | ||
isUriEncoded = decode(decl.value) !== decl.value; | ||
} catch (err) { | ||
isUriEncoded = false; | ||
} | ||
var minify = function minify(_, quote, svg, offset, str, cb) { | ||
@@ -35,2 +40,4 @@ if (!dataURI.test(svg) || !(0, _isSvg2['default'])(svg)) { | ||
quote = ''; | ||
} else if (quote === '"') { | ||
quote = "'"; | ||
} | ||
@@ -37,0 +44,0 @@ svgo.optimize(svg.replace(dataURI, ''), function (result) { |
{ | ||
"name": "postcss-svgo", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Optimise inline SVG with PostCSS.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
7790
5.37%58
13.73%