Skip to content

Commit 97612c6

Browse files
committed
Fix bug in name matching that should've been caught a while ago
1 parent 87166ac commit 97612c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PatchManager.SassyPatching/Utility/Extensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static Coordinate GetCoordinate(this ParserRuleContext @this) =>
2020
new(@this.Start.TokenSource.SourceName, @this.Start.Line, @this.Start.Column);
2121

2222
public static bool MatchesPattern(this string @this, string pattern) =>
23-
Regex.IsMatch(@this, pattern.Replace("*", ".*").Replace("?", ".?"));
23+
Regex.IsMatch(@this, $"^{pattern.Replace("*", ".*").Replace("?", ".?")}$");
2424

2525
public static string Escape(this string @this) => JsonConvert.ToString(@this);
2626

0 commit comments

Comments
 (0)