mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 18:42:40 +00:00
Add comma to var math split regex
This commit is contained in:
@@ -452,7 +452,7 @@ const replaceVar = function(input, hoist=false, allowUnresolved=false) {
|
|||||||
const label = match[2];
|
const label = match[2];
|
||||||
|
|
||||||
//v=====--------------------< HANDLE MATH >-------------------=====v//
|
//v=====--------------------< HANDLE MATH >-------------------=====v//
|
||||||
const mathRegex = /[a-z]+\(|[+\-*/^()]/g;
|
const mathRegex = /[a-z]+\(|[+\-*/^(),]/g;
|
||||||
const matches = label.split(mathRegex);
|
const matches = label.split(mathRegex);
|
||||||
const mathVars = matches.filter((match)=>isNaN(match))?.map((s)=>s.trim()); // Capture any variable names
|
const mathVars = matches.filter((match)=>isNaN(match))?.map((s)=>s.trim()); // Capture any variable names
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user