diff --git a/plugins/reusePaths.js b/plugins/reusePaths.js index 8e93bda5..79ba5c20 100644 --- a/plugins/reusePaths.js +++ b/plugins/reusePaths.js @@ -101,6 +101,9 @@ exports.fn = () => { } } if (defsTag.children.length !== 0) { + if (node.attributes['xmlns:xlink'] == null) { + node.attributes['xmlns:xlink'] = 'http://www.w3.org/1999/xlink'; + } node.children.unshift(defsTag); } } diff --git a/test/plugins/reusePaths.01.svg b/test/plugins/reusePaths.01.svg index 36303859..e177f845 100644 --- a/test/plugins/reusePaths.01.svg +++ b/test/plugins/reusePaths.01.svg @@ -16,7 +16,7 @@ @@@ - + diff --git a/test/plugins/reusePaths.02.svg b/test/plugins/reusePaths.02.svg index a938b521..4e7181e5 100644 --- a/test/plugins/reusePaths.02.svg +++ b/test/plugins/reusePaths.02.svg @@ -9,7 +9,7 @@ @@@ - + diff --git a/test/plugins/reusePaths.03.svg b/test/plugins/reusePaths.03.svg index 30b8288d..9fb91ad3 100644 --- a/test/plugins/reusePaths.03.svg +++ b/test/plugins/reusePaths.03.svg @@ -10,4 +10,4 @@ text element - \ No newline at end of file +