mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
Fix scientific notation parsing in paths
This commit is contained in:
@ -47,6 +47,11 @@ describe('parse path data', () => {
|
||||
expect(parsePathData('L 10 20')).to.deep.equal([]);
|
||||
expect(parsePathData('10 20')).to.deep.equal([]);
|
||||
});
|
||||
it('should stop on invalid scientific notation', () => {
|
||||
expect(parsePathData('M 0 5e++1 L 0 0')).to.deep.equal([
|
||||
{ command: 'M', args: [0, 5] },
|
||||
]);
|
||||
});
|
||||
it('should stop on invalid numbers', () => {
|
||||
expect(parsePathData('M ...')).to.deep.equal([]);
|
||||
});
|
||||
|
Reference in New Issue
Block a user