diff --git a/.svgo.yml b/.svgo.yml index b08cc0ad..ce22e050 100644 --- a/.svgo.yml +++ b/.svgo.yml @@ -32,8 +32,8 @@ plugins: - removeHiddenElems - removeEmptyText - moveElemsAttrsToGroup - - collapseGroups - moveGroupAttrsToElems + - collapseGroups - convertPathData - convertTransform - removeEmptyAttrs diff --git a/plugins/moveGroupAttrsToElems.js b/plugins/moveGroupAttrsToElems.js index 57ab51af..bcdb4367 100644 --- a/plugins/moveGroupAttrsToElems.js +++ b/plugins/moveGroupAttrsToElems.js @@ -1,10 +1,13 @@ 'use strict'; -exports.type = 'perItemReverse'; +exports.type = 'perItem'; exports.active = true; -var pathElems = require('./_collections.js').pathElems; +var pathElems = require('./_collections.js').pathElems.slice(); + +pathElems.push('g'); +pathElems.push('text'); /** * Move group attrs to the content elements. diff --git a/test/plugins/moveGroupAttrsToElems.03.svg b/test/plugins/moveGroupAttrsToElems.03.svg new file mode 100644 index 00000000..12b2719e --- /dev/null +++ b/test/plugins/moveGroupAttrsToElems.03.svg @@ -0,0 +1,19 @@ + + + + + + + + + +@@@ + + + + + + + + + diff --git a/test/plugins/moveGroupAttrsToElems.04.svg b/test/plugins/moveGroupAttrsToElems.04.svg new file mode 100644 index 00000000..ef8a4018 --- /dev/null +++ b/test/plugins/moveGroupAttrsToElems.04.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + +@@@ + + + + + + + + + + + +