From c8b03d8f2fec0ced129ffb852ba9a97564268e62 Mon Sep 17 00:00:00 2001 From: Raksit Date: Fri, 16 Aug 2019 18:22:06 +0700 Subject: [PATCH] feat: be able to receive negative numbers on $randomNumber --- core/lib/engine_util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/engine_util.js b/core/lib/engine_util.js index 90d3d25fca..2738f69e63 100644 --- a/core/lib/engine_util.js +++ b/core/lib/engine_util.js @@ -206,7 +206,7 @@ function template(o, context, inPlace) { if (!/{{/.test(o)) { return o; } - const funcCallRegex = /{{\s*(\$[A-Za-z0-9_]+\s*\(\s*[A-Za-z0-9_,\s]*\s*\))\s*}}/; + const funcCallRegex = /{{\s*(\$[A-Za-z0-9_]+\s*\(\s*[A-Za-z-\d_,\s]*\s*\))\s*}}/; let match = o.match(funcCallRegex); if (match) { // This looks like it could be a function call: