Commit 55d10fd
Changed files (1)
src/networking.py
@@ -388,7 +388,7 @@ async def match_social_media_link(text: str, *, flatten_first: bool = True) -> d
# https://github.com/user-name/repo/issues/123#issuecomment-45678
# https://github.com/user-name/repo/pull/123
# https://github.com/user-name/repo/pull/123#issuecomment-45678
- if matched := re.search(r"(https?://)?github\.com/([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)/([a-zA-Z0-9_-]+)/?([#/a-zA-Z0-9_-]+)?", text):
+ if matched := re.search(r"(https?://)?github\.com/([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)/([a-zA-Z0-9_-]+)/?([.#/a-zA-Z0-9_-]+)?", text):
gh_user = matched.group(2)
gh_repo = matched.group(4)
query = matched.group(5) or ""