Skip to content

Commit

Permalink
Merge 0d59d13 into 0fd9c7e
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieudutour committed Jan 19, 2020
2 parents 0fd9c7e + 0d59d13 commit 24d0606
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/path_parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function scanParam(state) {
if (zeroFirst && index < max) {
// decimal number starts with '0' such as '09' is illegal.
if (ch && isDigit(ch)) {
state.err = 'SvgPath: numbers started with `0` such as `09` are ilegal (at pos ' + start + ')';
state.err = 'SvgPath: numbers started with `0` such as `09` are illegal (at pos ' + start + ')';
return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/path_parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('Path parse', function () {
assert.equal(svgpath('M0 0G 1').err, 'SvgPath: bad command G (at pos 4)');
assert.equal(svgpath('z').err, 'SvgPath: string should start with `M` or `m`');
assert.equal(svgpath('M+').err, 'SvgPath: param should start with 0..9 or `.` (at pos 2)');
assert.equal(svgpath('M00').err, 'SvgPath: numbers started with `0` such as `09` are ilegal (at pos 1)');
assert.equal(svgpath('M00').err, 'SvgPath: numbers started with `0` such as `09` are illegal (at pos 1)');
assert.equal(svgpath('M0e').err, 'SvgPath: invalid float exponent (at pos 3)');
assert.equal(svgpath('M0').err, 'SvgPath: missed param (at pos 2)');
assert.equal(svgpath('M0,0,').err, 'SvgPath: missed param (at pos 5)');
Expand Down

0 comments on commit 24d0606

Please sign in to comment.