schnee effeckt und fehler Korektur
This commit is contained in:
29
node_modules/svgo/plugins/removeTitle.js
generated
vendored
29
node_modules/svgo/plugins/removeTitle.js
generated
vendored
@@ -1,24 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
exports.type = 'perItem';
|
||||
const { detachNodeFromParent } = require('../lib/xast.js');
|
||||
|
||||
exports.active = false;
|
||||
|
||||
exports.description = 'removes <title> (disabled by default)';
|
||||
exports.name = 'removeTitle';
|
||||
exports.type = 'visitor';
|
||||
exports.active = true;
|
||||
exports.description = 'removes <title>';
|
||||
|
||||
/**
|
||||
* Remove <title>.
|
||||
* Disabled by default cause it may be used for accessibility.
|
||||
*
|
||||
* https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title
|
||||
*
|
||||
* @param {Object} item current iteration item
|
||||
* @return {Boolean} if false, item will be filtered out
|
||||
*
|
||||
* @author Igor Kalashnikov
|
||||
*
|
||||
* @type {import('../lib/types').Plugin<void>}
|
||||
*/
|
||||
exports.fn = function(item) {
|
||||
|
||||
return !item.isElem('title');
|
||||
|
||||
exports.fn = () => {
|
||||
return {
|
||||
element: {
|
||||
enter: (node, parentNode) => {
|
||||
if (node.name === 'title') {
|
||||
detachNodeFromParent(node, parentNode);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user