@iconify/tools 5.0.9 → 5.0.10

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.
@@ -23,11 +23,12 @@ function parseSVGStyle(svg, callback) {
23
23
  const node = item.node;
24
24
  const tagName = node.tag;
25
25
  function parseStyleItem() {
26
- const content = stringifyXMLContent(node.children);
26
+ let content = stringifyXMLContent(node.children);
27
27
  if (!content) {
28
28
  item.removeNode = true;
29
29
  return;
30
30
  }
31
+ content = content.replace("<![CDATA[", "").replace("]]>", "");
31
32
  const tokens = getTokens(content);
32
33
  if (!(tokens instanceof Array)) throw new Error("Error parsing style. This parser can handle only basic CSS");
33
34
  let changed = false;
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": "5.0.9",
6
+ "version": "5.0.10",
7
7
  "license": "MIT",
8
8
  "bugs": "https://github.com/iconify/tools/issues",
9
9
  "homepage": "https://github.com/iconify/tools",