Skip to content
This repository was archived by the owner on Nov 24, 2022. It is now read-only.

Commit 656ab38

Browse files
Merge pull request #86 from gonX/patch-1
Ignore query string in path name
2 parents 0ecca67 + 61f7d94 commit 656ab38

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

TabletBot.Discord/Watchers/GitHub/CodeMessageWatcher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public CodeMessageWatcher(GitHubClient client)
2020
}
2121

2222
private static readonly Regex CodeRefRegex = new Regex(
23-
@"https:\/\/github.com\/(?<Owner>.+?)\/(?<Repo>.+?)\/blob\/(?<GitRef>.+?)\/(?<Path>.+?)#L(?<StartLine>.+?)(?:-L(?<EndLine>.+?))?($| |>)",
23+
@"https:\/\/github.com\/(?<Owner>.+?)\/(?<Repo>.+?)\/blob\/(?<GitRef>.+?)\/(?<Path>.+?)(\?.+?)?#L(?<StartLine>.+?)(?:-L(?<EndLine>.+?))?($| |>)",
2424
RegexOptions.Compiled
2525
);
2626

@@ -60,4 +60,4 @@ public async Task Receive(IMessage message)
6060
public Task Deleted(Cacheable<IMessage, ulong> message, Cacheable<IMessageChannel, ulong> channel) =>
6161
Task.CompletedTask;
6262
}
63-
}
63+
}

0 commit comments

Comments
 (0)