diff --git a/plugin_template/swinfo.json b/plugin_template/swinfo.json index 369a8fb..966d6a2 100644 --- a/plugin_template/swinfo.json +++ b/plugin_template/swinfo.json @@ -5,7 +5,7 @@ "name": "Patch Manager", "description": "A mod for generic patching needs similar to KSP 1's Module Manager.", "source": "https://github.com/KSP2Community/PatchManager", - "version": "0.11.0", + "version": "0.11.1", "version_check": "https://raw.githubusercontent.com/KSP2Community/PatchManager/main/plugin_template/swinfo.json", "ksp2_version": { "min": "0.2.0", diff --git a/src/PatchManager.SassyPatching/Utility/Extensions.cs b/src/PatchManager.SassyPatching/Utility/Extensions.cs index 30acb2b..a848c7c 100644 --- a/src/PatchManager.SassyPatching/Utility/Extensions.cs +++ b/src/PatchManager.SassyPatching/Utility/Extensions.cs @@ -20,7 +20,7 @@ public static Coordinate GetCoordinate(this ParserRuleContext @this) => new(@this.Start.TokenSource.SourceName, @this.Start.Line, @this.Start.Column); public static bool MatchesPattern(this string @this, string pattern) => - Regex.IsMatch(@this, pattern.Replace("*", ".*").Replace("?", ".?")); + Regex.IsMatch(@this, $"^{pattern.Replace("*", ".*").Replace("?", ".?")}$"); public static string Escape(this string @this) => JsonConvert.ToString(@this);