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:
@ -58,7 +58,7 @@ const readNumber = (string, cursor) => {
|
||||
continue;
|
||||
}
|
||||
if (state === 'e') {
|
||||
state === 'exponent_sign';
|
||||
state = 'exponent_sign';
|
||||
value += c;
|
||||
continue;
|
||||
}
|
||||
@ -216,7 +216,7 @@ const stringifyNumber = ({ number, precision }) => {
|
||||
} else {
|
||||
result = number.toFixed(precision);
|
||||
if (result.includes('.')) {
|
||||
result = result.replace(/\.?0+$/, '')
|
||||
result = result.replace(/\.?0+$/, '');
|
||||
}
|
||||
}
|
||||
// remove zero whole from decimal number
|
||||
|
Reference in New Issue
Block a user