@iconify/tools 2.2.0-beta.2 → 2.2.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,6 +81,14 @@ function runSVGO(svg, options = {}) {
81
81
  );
82
82
  }
83
83
  }
84
+ if (!options.plugins || options.plugins.find((item) => {
85
+ if (typeof item === "string") {
86
+ return item === "reusePaths";
87
+ }
88
+ return item.name === "reusePaths";
89
+ })) {
90
+ content = content.replace(' xmlns:xlink="http://www.w3.org/1999/xlink"', "").replaceAll("xlink:href=", "href=");
91
+ }
84
92
  svg.load(content);
85
93
  }
86
94
 
@@ -79,6 +79,14 @@ function runSVGO(svg, options = {}) {
79
79
  );
80
80
  }
81
81
  }
82
+ if (!options.plugins || options.plugins.find((item) => {
83
+ if (typeof item === "string") {
84
+ return item === "reusePaths";
85
+ }
86
+ return item.name === "reusePaths";
87
+ })) {
88
+ content = content.replace(' xmlns:xlink="http://www.w3.org/1999/xlink"', "").replaceAll("xlink:href=", "href=");
89
+ }
82
90
  svg.load(content);
83
91
  }
84
92
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "description": "Collection of functions for cleaning up and parsing SVG for Iconify project",
5
5
  "author": "Vjacheslav Trushkin",
6
- "version": "2.2.0-beta.2",
6
+ "version": "2.2.0-beta.3",
7
7
  "license": "MIT",
8
8
  "bugs": "https://github.com/iconify/tools/issues",
9
9
  "homepage": "https://github.com/iconify/tools",
@@ -15,7 +15,7 @@
15
15
  "module": "./lib/index.mjs",
16
16
  "types": "./lib/index.d.ts",
17
17
  "dependencies": {
18
- "@iconify/utils": "^2.0.5",
18
+ "@iconify/utils": "^2.0.9",
19
19
  "@types/cheerio": "^0.22.31",
20
20
  "@types/node-fetch": "^2.6.2",
21
21
  "@types/tar": "^6.1.3",