mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
Format all plugins with prettier
This commit is contained in:
@ -4,11 +4,12 @@ exports.type = 'perItem';
|
||||
|
||||
exports.active = true;
|
||||
|
||||
exports.description = 'removes non-inheritable group’s presentational attributes';
|
||||
exports.description =
|
||||
'removes non-inheritable group’s presentational attributes';
|
||||
|
||||
var inheritableAttrs = require('./_collections').inheritableAttrs,
|
||||
attrsGroups = require('./_collections').attrsGroups,
|
||||
applyGroups = require('./_collections').presentationNonInheritableGroupAttrs;
|
||||
attrsGroups = require('./_collections').attrsGroups,
|
||||
applyGroups = require('./_collections').presentationNonInheritableGroupAttrs;
|
||||
|
||||
/**
|
||||
* Remove non-inheritable group's "presentation" attributes.
|
||||
@ -18,20 +19,16 @@ var inheritableAttrs = require('./_collections').inheritableAttrs,
|
||||
*
|
||||
* @author Kir Belevich
|
||||
*/
|
||||
exports.fn = function(item) {
|
||||
|
||||
if (item.isElem('g')) {
|
||||
|
||||
item.eachAttr(function(attr) {
|
||||
if (
|
||||
~attrsGroups.presentation.indexOf(attr.name) &&
|
||||
!~inheritableAttrs.indexOf(attr.name) &&
|
||||
!~applyGroups.indexOf(attr.name)
|
||||
) {
|
||||
item.removeAttr(attr.name);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
exports.fn = function (item) {
|
||||
if (item.isElem('g')) {
|
||||
item.eachAttr(function (attr) {
|
||||
if (
|
||||
~attrsGroups.presentation.indexOf(attr.name) &&
|
||||
!~inheritableAttrs.indexOf(attr.name) &&
|
||||
!~applyGroups.indexOf(attr.name)
|
||||
) {
|
||||
item.removeAttr(attr.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user