Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
height = parseFloat(attribute[1]);
}
}
if (width !== undefined && height != undefined) {
tag.attributes = tag.attributes.filter((attribute) => {
return attribute[0] !== 'width' && attribute[0] != 'height'
})
tag.attributes.push(['viewBox', `0 0 ${width} ${height}`, true]);
tag.attributes.push(['height', '1em', true]);
tag.attributes.push(['width', `${width / height}em`, true]);
}
}
return tag;
})
return simpleHTMLTokenizer.generate(tokens)
};