svgo
svgo copied to clipboard
Corrupted image from systemd-analyze after default optimization
# Arch Linux
% svgo --version
3.2.0
% node --version
v21.7.1
% pacman -Q systemd
systemd 255.4-2
Left is broken, right is working:
Repro:
# Create new
systemd-analyze plot > plot.svg
# Or use test file of mine
curl -Lo plot.svg https://github.com/svg/svgo/assets/1641362/d460b1bf-cb12-4b1e-a1d9-39dbfdeb420e
# Optimize and break
svgo --input plot.svg --output broken.svg
Done in 1029 ms!
365.526 KiB - 58.5% = 151.647 KiB
# View
nomacs broken.svg
Please fill in the issue with all required information, especially how to reproduce.
I have fat-fingered the ENTER key, currently editing it, sorry.
EDIT: Done
This looks like a specific instance of the general problem flagged in issue #1953. Most plugins are potentially unsafe if <style>
elements are present. In this particular case, there are styles on <line>
and <rect>
elements that are no longer applied when they are converted to <path>
elements.