Skip to content

Commit 95be993

Browse files
committed
Graphics files don't have inlines
1 parent b4b8b5e commit 95be993

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

src/IronyModManager.Parser/Generic/GraphicsParser.cs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Created : 02-18-2020
55
//
66
// Last Modified By : Mario
7-
// Last Modified On : 10-17-2024
7+
// Last Modified On : 05-23-2025
88
// ***********************************************************************
99
// <copyright file="GraphicsParser.cs" company="Mario">
1010
// Mario
@@ -110,7 +110,7 @@ public GraphicsParser(IObjectClone objectClone, ICodeParser codeParser, ILogger
110110
/// <returns><c>true</c> if this instance can parse the specified arguments; otherwise, <c>false</c>.</returns>
111111
public override bool CanParse(CanParseArgs args)
112112
{
113-
return ValidExtensions.Any(a => args.File.EndsWith(a, StringComparison.OrdinalIgnoreCase)) || IsContentGraphics(args, false, out var _, out var _);
113+
return ValidExtensions.Any(a => args.File.EndsWith(a, StringComparison.OrdinalIgnoreCase)) || IsContentGraphics(args, false, out _, out _);
114114
}
115115

116116
/// <summary>
@@ -180,15 +180,22 @@ protected override string EvalElementForId(IScriptElement value)
180180
}
181181
else
182182
{
183-
if (Common.Constants.Scripts.GraphicsTypeName.Equals(value.Key, StringComparison.OrdinalIgnoreCase))
184-
{
185-
return value.Value;
186-
}
187-
188-
return base.EvalElementForId(value);
183+
return Common.Constants.Scripts.GraphicsTypeName.Equals(value.Key, StringComparison.OrdinalIgnoreCase) ? value.Value : base.EvalElementForId(value);
189184
}
190185
}
191186

187+
/// <summary>
188+
/// Evals for inlines.
189+
/// </summary>
190+
/// <param name="defaultId">The default identifier.</param>
191+
/// <param name="id">The identifier.</param>
192+
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
193+
protected override bool EvalForInlines(string defaultId, string id)
194+
{
195+
// No inlines here
196+
return false;
197+
}
198+
192199
/// <summary>
193200
/// Determines whether [is content graphics] [the specified arguments].
194201
/// </summary>

0 commit comments

Comments
 (0)