diff --git a/plugins/_collections.js b/plugins/_collections.js index 3c16658..af03a45 100644 --- a/plugins/_collections.js +++ b/plugins/_collections.js @@ -1750,7 +1750,6 @@ export const elems = { 'height', 'preserveAspectRatio', 'style', - 'version', 'viewBox', 'width', 'x', @@ -1764,20 +1763,10 @@ export const elems = { height: '100%', preserveAspectRatio: 'xMidYMid meet', zoomAndPan: 'magnify', - version: '1.1', baseProfile: 'none', contentScriptType: 'application/ecmascript', contentStyleType: 'text/css', }, - deprecated: { - safe: new Set(['version']), - unsafe: new Set([ - 'baseProfile', - 'contentScriptType', - 'contentStyleType', - 'zoomAndPan', - ]), - }, contentGroups: new Set([ 'animation', 'descriptive', diff --git a/plugins/removeUnknownsAndDefaults.js b/plugins/removeUnknownsAndDefaults.js index bce3ea8..a2fe565 100644 --- a/plugins/removeUnknownsAndDefaults.js +++ b/plugins/removeUnknownsAndDefaults.js @@ -116,7 +116,10 @@ export const fn = (root, params, info) => { } // See if the element or any of its parents are used. while (true) { - if (element.attributes.id && usedIDs.has(element.attributes.id)) { + if ( + element.attributes.id && + usedIDs.has(element.attributes.id.toString()) + ) { return true; } const parent = element.parentNode; @@ -294,7 +297,7 @@ export const fn = (root, params, info) => { // (b) not inheritable, and a default value. const isDefault = isDefaultPropertyValue( name, - value, + value.toString(), attributesDefaults, ); if (inheritableAttrs.has(name)) { diff --git a/test/plugins/removeUnknownsAndDefaults.32.svg.txt b/test/plugins/removeUnknownsAndDefaults.32.svg.txt new file mode 100644 index 0000000..7232ffa --- /dev/null +++ b/test/plugins/removeUnknownsAndDefaults.32.svg.txt @@ -0,0 +1,13 @@ +Remove version attribute. + +=== + + + + + +@@@ + + + +