6c5a5256c7
Switch SVG optimizer resolution from bin/svgo-cli.exe to bin/svgo.cmd. Update unit tests to validate the new local binary path behavior. Co-Authored-By: Abacus.AI CLI <agent@abacus.ai>
26 lines
522 B
JavaScript
26 lines
522 B
JavaScript
import { detachNodeFromParent } from '../lib/xast.js';
|
|
|
|
export const name = 'removeTitle';
|
|
export const description = 'removes <title>';
|
|
|
|
/**
|
|
* Remove <title>.
|
|
*
|
|
* https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title
|
|
*
|
|
* @author Igor Kalashnikov
|
|
*
|
|
* @type {import('../lib/types.js').Plugin}
|
|
*/
|
|
export const fn = () => {
|
|
return {
|
|
element: {
|
|
enter: (node, parentNode) => {
|
|
if (node.name === 'title') {
|
|
detachNodeFromParent(node, parentNode);
|
|
}
|
|
},
|
|
},
|
|
};
|
|
};
|