From f94fafec2cde2b59c7eccec65a635187558b1c13 Mon Sep 17 00:00:00 2001 From: John Andrews Date: Fri, 6 Dec 2024 07:28:50 +1300 Subject: [PATCH] FF-1958: Fixed typo in img.DateMonth --- BasicNodes/Functions/Matches.cs | 5 +++++ ImageNodes/Images/ImageBaseNode.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/BasicNodes/Functions/Matches.cs b/BasicNodes/Functions/Matches.cs index 3a760f02..9095b726 100644 --- a/BasicNodes/Functions/Matches.cs +++ b/BasicNodes/Functions/Matches.cs @@ -44,12 +44,17 @@ public class Matches : Node output++; try { + // the value is what we will test object value; + // first try to see if the key is a Variable, and if it is get the variables value if (Regex.IsMatch(match.Key, @"\{[\w\d\.-]+\}") && args.Variables.TryGetValue(match.Key[1..^1], out var varValue)) value = varValue; else + { + // else, its not a variable, but it may contain a variable value = args.ReplaceVariables(match.Key, stripMissing: true); + } if (args.MathHelper.IsMathOperation(match.Value)) { diff --git a/ImageNodes/Images/ImageBaseNode.cs b/ImageNodes/Images/ImageBaseNode.cs index 678a3081..df79dd11 100644 --- a/ImageNodes/Images/ImageBaseNode.cs +++ b/ImageNodes/Images/ImageBaseNode.cs @@ -119,7 +119,7 @@ public abstract class ImageBaseNode:Node { args.Variables["img.DateTaken"] = imageInfo.DateTaken.Value; args.Variables["img.DateYear"] = imageInfo.DateTaken.Value.Year; - args.Variables["img.DateMont"] = imageInfo.DateTaken.Value.Year; + args.Variables["img.DateMonth"] = imageInfo.DateTaken.Value.Year; } else args.Variables.Remove("img.DateTaken");