Commit 425979f

benny-dou <60535774+benny-dou@users.noreply.github.com>
2026-04-14 08:38:51
fix(networking): fix regex for github links
1 parent a5242e0
Changed files (1)
src/networking.py
@@ -389,7 +389,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 ""