From 2202aaafb052e38d85b3d7606d0bd3309dea21ce Mon Sep 17 00:00:00 2001 From: dgw Date: Fri, 25 Nov 2022 16:48:04 -0600 Subject: [PATCH] github: allow fragment in repo URLs --- sopel_modules/github/github.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sopel_modules/github/github.py b/sopel_modules/github/github.py index 06d8e4b..7dfa620 100644 --- a/sopel_modules/github/github.py +++ b/sopel_modules/github/github.py @@ -59,7 +59,7 @@ githubRepoSlug = r'[A-Za-z0-9\.\-_]+' # lots of regex and other globals to make this stuff work baseURL = r'https?://(?:www\.)?github\.com/({username}/{repo})'.format(username=githubUsername, repo=githubRepoSlug) -repoURL = baseURL + r'/?(?!\S)' +repoURL = baseURL + r'/?(?:#.*|(?!\S))' issueURL = baseURL + r'/(?:issues|pull)/([\d]+)(?:#issuecomment-([\d]+))?' commitURL = baseURL + r'/(?:commit)/([A-z0-9\-]+)' contentURL = baseURL + r'/(?:blob|raw)/([^/\s]+)/([^#\s]+)(?:#L(\d+)(?:-L(\d+))?)?'