the editable site (validation-lab)
deploy / build-and-publish (push) Successful in 1m37s

This commit is contained in:
2026-11-21 08:03:55 +01:00
commit 3ac81d5a52
13454 changed files with 2227005 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import { detachNodeFromParent } from '../lib/xast.js';
export const name = 'removeRasterImages';
export const description = 'removes raster images';
/**
* 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}
* @since 0.2.3
*/
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);
}
},
},
};
};