Skip to content

Commit

Permalink
Merge pull request #116 from sopel-irc/fragment-links
Browse files Browse the repository at this point in the history
github: allow fragment in repo URLs
  • Loading branch information
dgw authored Nov 28, 2022
2 parents e21e99e + 2202aaa commit 1a4e523
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sopel_modules/github/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -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+))?)?'
Expand Down

0 comments on commit 1a4e523

Please sign in to comment.