From 14b728171240f45a0ed2f943b504e1204374d0fc Mon Sep 17 00:00:00 2001 From: Tim Nugent Date: Fri, 21 Feb 2025 10:41:36 +1100 Subject: [PATCH] fixed an ambiguous markup value bug in line parser. --- YarnSpinner/YarnSpinner.Markup/LineParser.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/YarnSpinner/YarnSpinner.Markup/LineParser.cs b/YarnSpinner/YarnSpinner.Markup/LineParser.cs index 2d412c0b8..ba3a6a00c 100644 --- a/YarnSpinner/YarnSpinner.Markup/LineParser.cs +++ b/YarnSpinner/YarnSpinner.Markup/LineParser.cs @@ -1526,7 +1526,7 @@ public class BuiltInMarkupReplacer : IAttributeMarkerProcessor { List diagnostics = new List(); - if (!marker.TryGetProperty(value, out var replacementProp)) + if (!marker.TryGetProperty(value, out MarkupValue replacementProp)) { diagnostics.Add(new LineParser.MarkupDiagnostic($"no replacement value for {value} was found")); return diagnostics; @@ -1592,7 +1592,7 @@ public class BuiltInMarkupReplacer : IAttributeMarkerProcessor // Now that we know the plural case, we can select the // appropriate replacement text for it - if (!marker.TryGetProperty(pluralCaseName, out var replacementValue)) + if (!marker.TryGetProperty(pluralCaseName, out MarkupValue replacementValue)) { diagnostics.Add(new LineParser.MarkupDiagnostic($"no replacement for {numericValue}'s plural case of {pluralCaseName} was found.")); return diagnostics; @@ -1623,7 +1623,7 @@ public class BuiltInMarkupReplacer : IAttributeMarkerProcessor }; return diagnostics; } - if (marker.TryGetProperty("value", out var valueProp) == false) + if (marker.TryGetProperty("value", out MarkupValue valueProp) == false) { List diagnostics = new List {