Skip to content

Commit

Permalink
fixed an ambiguous markup value bug in line parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
McJones committed Feb 20, 2025
1 parent 1364266 commit 14b7281
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions YarnSpinner/YarnSpinner.Markup/LineParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ public class BuiltInMarkupReplacer : IAttributeMarkerProcessor
{
List<LineParser.MarkupDiagnostic> diagnostics = new List<LineParser.MarkupDiagnostic>();

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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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<LineParser.MarkupDiagnostic> diagnostics = new List<LineParser.MarkupDiagnostic>
{
Expand Down

0 comments on commit 14b7281

Please sign in to comment.