mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
Remove flag spaces for all arcs (#1484)
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 <joseprio@fb.com> Co-authored-by: Bogdan Chadkin <trysound@yandex.ru>
This commit is contained in:
@ -165,18 +165,19 @@ describe('stringify path data', () => {
|
||||
{ command: 'M', args: [0, 0] },
|
||||
{ command: 'A', args: [50, 50, 10, 1, 0, 0.2, 20] },
|
||||
{ command: 'a', args: [50, 50, 10, 1, 0, 0.2, 20] },
|
||||
{ command: 'a', args: [50, 50, 10, 1, 0, 0.2, 20] },
|
||||
];
|
||||
expect(
|
||||
stringifyPathData({
|
||||
pathData,
|
||||
disableSpaceAfterFlags: false,
|
||||
})
|
||||
).toEqual('M0 0A50 50 10 1 0 .2 20a50 50 10 1 0 .2 20');
|
||||
).toEqual('M0 0A50 50 10 1 0 .2 20a50 50 10 1 0 .2 20 50 50 10 1 0 .2 20');
|
||||
expect(
|
||||
stringifyPathData({
|
||||
pathData,
|
||||
disableSpaceAfterFlags: true,
|
||||
})
|
||||
).toEqual('M0 0A50 50 10 10.2 20a50 50 10 10.2 20');
|
||||
).toEqual('M0 0A50 50 10 10.2 20a50 50 10 10.2 20 50 50 10 10.2 20');
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user