mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
added removeDesc plugin
This commit is contained in:
22
plugins/removeDesc.js
Normal file
22
plugins/removeDesc.js
Normal file
@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
exports.type = 'perItem';
|
||||
|
||||
exports.active = false;
|
||||
|
||||
/**
|
||||
* Remove <desc>.
|
||||
* Disabled by default cause it may be used for accessibility.
|
||||
*
|
||||
* https://developer.mozilla.org/en-US/docs/Web/SVG/Element/desc
|
||||
*
|
||||
* @param {Object} item current iteration item
|
||||
* @return {Boolean} if false, item will be filtered out
|
||||
*
|
||||
* @author Daniel Wabyick
|
||||
*/
|
||||
exports.fn = function(item) {
|
||||
|
||||
return !item.isElem('desc');
|
||||
|
||||
};
|
Reference in New Issue
Block a user