From 0f42ad5c5eec069d5f0632e2e44b62071f3fb894 Mon Sep 17 00:00:00 2001 From: Paul Henschel Date: Tue, 8 May 2018 18:03:13 +0200 Subject: [PATCH] fix scientific notation bug in interpolation --- src/Interpolation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Interpolation.js b/src/Interpolation.js index eeda6e1..89d31cb 100644 --- a/src/Interpolation.js +++ b/src/Interpolation.js @@ -172,7 +172,7 @@ function colorToRgba(input: string): string { return `rgba(${r}, ${g}, ${b}, ${a})`; } -var stringShapeRegex = /[0-9\.-]+/g; +var stringShapeRegex = /([0-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; /** * Supports string shapes by extracting numbers so new values can be computed,