-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suboptimal output after upgrading to version 2.3 #1476
Comments
Hi. Show your config and original svg please. |
@TrySound sorry about that; I only keep the optimized SVG, so that's the "original", and the regression appears when running the new SVGO on it. Here's my configuration:
|
It seems that multiple, consecutive arc commands are merged in a single command call, and the changes in #1403 only applied to the first one. I did a quick PR with the solution; happy to add any changes as needed! |
Ref #1476 The issue is that a path command may have multiple arcs, and the space optimization was only applied to the first one. Modified a test to check it. Co-authored-by: Josep del Río <[email protected]> Co-authored-by: Bogdan Chadkin <[email protected]>
Describe the bug
Seems to be a regression of #1403; after updating from version 1 to 2, I noticed an increase in file size. I applied the additional configuration from #1353, and while it improved the situation, the there's still some superfluous spaces added to the arc command.
To Reproduce
Original SVG optimized with version 1:
After applying 2.3:
a3.344 3.344 0 00-3.35 3.337 3.344 3.344 0 003.351 3.336 3.344 3.344 0 003.347-3.34
got converted toa3.344 3.344 0 00-3.35 3.337 3.344 3.344 0 0 0 3.351 3.336 3.344 3.344 0 0 0 3.347-3.34
; notice how spaces are removed only sometimes.Expected behavior
When using the
noSpaceAfterFlags
, I expect that all unneeded spaces are removed like in previous versions.The text was updated successfully, but these errors were encountered: