From f58d52c4b6d91a938cc8be0c04efbd626bb38d31 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sat, 10 Aug 2024 07:54:50 +1200 Subject: [PATCH] Add comma to var math split regex --- shared/naturalcrit/markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 518b48705..49c2d8fa0 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -452,7 +452,7 @@ const replaceVar = function(input, hoist=false, allowUnresolved=false) { const label = match[2]; //v=====--------------------< HANDLE MATH >-------------------=====v// - const mathRegex = /[a-z]+\(|[+\-*/^()]/g; + const mathRegex = /[a-z]+\(|[+\-*/^(),]/g; const matches = label.split(mathRegex); const mathVars = matches.filter((match)=>isNaN(match))?.map((s)=>s.trim()); // Capture any variable names