Website Structure
This commit is contained in:
parent
62812f2090
commit
71f0676a62
22365 changed files with 4265753 additions and 791 deletions
29
Frontend-Learner/node_modules/svgo/plugins/removeRasterImages.js
generated
vendored
Normal file
29
Frontend-Learner/node_modules/svgo/plugins/removeRasterImages.js
generated
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import { detachNodeFromParent } from '../lib/xast.js';
|
||||
|
||||
export const name = 'removeRasterImages';
|
||||
export const description = 'removes raster images (disabled by default)';
|
||||
|
||||
/**
|
||||
* Remove raster images references in <image>.
|
||||
*
|
||||
* @see https://bugs.webkit.org/show_bug.cgi?id=63548
|
||||
*
|
||||
* @author Kir Belevich
|
||||
*
|
||||
* @type {import('../lib/types.js').Plugin}
|
||||
*/
|
||||
export const fn = () => {
|
||||
return {
|
||||
element: {
|
||||
enter: (node, parentNode) => {
|
||||
if (
|
||||
node.name === 'image' &&
|
||||
node.attributes['xlink:href'] != null &&
|
||||
/(\.|image\/)(jpe?g|png|gif)/.test(node.attributes['xlink:href'])
|
||||
) {
|
||||
detachNodeFromParent(node, parentNode);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue