FF-1731: Track selector

This commit is contained in:
John Andrews
2024-08-17 17:26:02 +12:00
parent c465a2843e
commit 647f1375d8
7 changed files with 269 additions and 35 deletions

View File

@@ -52,7 +52,7 @@ public class Matches : Node
value = varValue;
else
value = args.ReplaceVariables(match.Key, stripMissing: true);
string strValue = value?.ToString() ?? string.Empty;
string strValue = value?.ToString()?.Trim() ?? string.Empty;
if (GeneralHelper.IsRegex(match.Value))
{
@@ -76,12 +76,9 @@ public class Matches : Node
return output;
}
if (match.Value == strValue)
{
args.Logger?.ILog($"Match found '{match.Value}' = {strValue}");
if (args.StringHelper.Matches(match.Value, match.Value))
return output;
}
if (args.MathHelper.IsMathOperation(match.Value))
{
if (args.MathHelper.IsTrue(match.Value, strValue))