From 45a9068e581e5d0f3e5ed4e6b1295f34049f4338 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Thu, 25 Apr 2024 04:00:53 +0900 Subject: [PATCH] Fix regex bug in executeRPNCalculation function --- src/ts/process/infunctions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ts/process/infunctions.ts b/src/ts/process/infunctions.ts index 5841d9ad..d9322282 100644 --- a/src/ts/process/infunctions.ts +++ b/src/ts/process/infunctions.ts @@ -69,7 +69,7 @@ function calculateRPN(expression:string) { } function executeRPNCalculation(text:string) { - text = text.replace(/\$([a-zA-Z0-9_]+)/, (_, p1) => { + text = text.replace(/\$([a-zA-Z0-9_]+)/g, (_, p1) => { const v = getChatVar(p1) const parsed = parseFloat(v) if(isNaN(parsed)){