svgo icon indicating copy to clipboard operation
svgo copied to clipboard

Corrupted image from systemd-analyze after default optimization

Open C0rn3j opened this issue 10 months ago • 3 comments

# 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:

image

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

C0rn3j avatar Mar 30 '24 23:03 C0rn3j

Please fill in the issue with all required information, especially how to reproduce.

KTibow avatar Mar 30 '24 23:03 KTibow

I have fat-fingered the ENTER key, currently editing it, sorry.

EDIT: Done

C0rn3j avatar Mar 30 '24 23:03 C0rn3j

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.

johnkenny54 avatar Aug 04 '24 13:08 johnkenny54