Skip to content

Commit 1a4e523

Browse files
authored
Merge pull request #116 from sopel-irc/fragment-links
github: allow fragment in repo URLs
2 parents e21e99e + 2202aaa commit 1a4e523

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sopel_modules/github/github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
githubRepoSlug = r'[A-Za-z0-9\.\-_]+'
6060
# lots of regex and other globals to make this stuff work
6161
baseURL = r'https?://(?:www\.)?github\.com/({username}/{repo})'.format(username=githubUsername, repo=githubRepoSlug)
62-
repoURL = baseURL + r'/?(?!\S)'
62+
repoURL = baseURL + r'/?(?:#.*|(?!\S))'
6363
issueURL = baseURL + r'/(?:issues|pull)/([\d]+)(?:#issuecomment-([\d]+))?'
6464
commitURL = baseURL + r'/(?:commit)/([A-z0-9\-]+)'
6565
contentURL = baseURL + r'/(?:blob|raw)/([^/\s]+)/([^#\s]+)(?:#L(\d+)(?:-L(\d+))?)?'

0 commit comments

Comments
 (0)