Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
716cf56cb2.url-de-test.ws
/
htdocs
/
node_modules
/
svgo
/
plugins
/
/srv/data/web/vhosts/716cf56cb2.url-de-test.ws/htdocs/node_modules/svgo/plugins/removeEmptyAttrs.js
'use strict'; const { attrsGroups } = require('./_collections.js'); exports.name = 'removeEmptyAttrs'; exports.description = 'removes empty attributes'; /** * Remove attributes with empty values. * * @author Kir Belevich * * @type {import('./plugins-types').Plugin<'removeEmptyAttrs'>} */ exports.fn = () => { return { element: { enter: (node) => { for (const [name, value] of Object.entries(node.attributes)) { if ( value === '' && // empty conditional processing attributes prevents elements from rendering !attrsGroups.conditionalProcessing.has(name) ) { delete node.attributes[name]; } } }, }, }; };