schnee effeckt und fehler Korektur
This commit is contained in:
26
node_modules/svgo/plugins/removeComments.js
generated
vendored
26
node_modules/svgo/plugins/removeComments.js
generated
vendored
@@ -1,9 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
exports.type = 'perItem';
|
||||
const { detachNodeFromParent } = require('../lib/xast.js');
|
||||
|
||||
exports.name = 'removeComments';
|
||||
exports.type = 'visitor';
|
||||
exports.active = true;
|
||||
|
||||
exports.description = 'removes comments';
|
||||
|
||||
/**
|
||||
@@ -13,15 +14,18 @@ exports.description = 'removes comments';
|
||||
* <!-- Generator: Adobe Illustrator 15.0.0, SVG Export
|
||||
* Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
*
|
||||
* @param {Object} item current iteration item
|
||||
* @return {Boolean} if false, item will be filtered out
|
||||
*
|
||||
* @author Kir Belevich
|
||||
*
|
||||
* @type {import('../lib/types').Plugin<void>}
|
||||
*/
|
||||
exports.fn = function(item) {
|
||||
|
||||
if (item.comment && item.comment.charAt(0) !== '!') {
|
||||
return false;
|
||||
}
|
||||
|
||||
exports.fn = () => {
|
||||
return {
|
||||
comment: {
|
||||
enter: (node, parentNode) => {
|
||||
if (node.value.charAt(0) !== '!') {
|
||||
detachNodeFromParent(node, parentNode);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user