aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Andi Qu <[email protected]>2021-01-24 19:57:26 +0200
committerGravatar GitHub <[email protected]>2021-01-24 19:57:26 +0200
commit87facef69acfaa1d8b69b5a03bfabc9582aa1ace (patch)
treebb81959fe302e090d4d27cf09c99805f8bb86416
parentAccount for query params in bitbucket (diff)
More restrictive GitHub gist regex for usernames
-rw-r--r--bot/exts/info/code_snippets.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/info/code_snippets.py b/bot/exts/info/code_snippets.py
index 75d8ac290..e1b2079d0 100644
--- a/bot/exts/info/code_snippets.py
+++ b/bot/exts/info/code_snippets.py
@@ -18,7 +18,7 @@ GITHUB_RE = re.compile(
)
GITHUB_GIST_RE = re.compile(
- r'https://gist\.github\.com/([^/]+)/(?P<gist_id>[a-zA-Z0-9]+)/*'
+ r'https://gist\.github\.com/([a-zA-Z0-9-]+)/(?P<gist_id>[a-zA-Z0-9]+)/*'
r'(?P<revision>[a-zA-Z0-9-]*)/*#file-(?P<file_path>[^#>]+?)'
r'(-L(?P<start_line>\d+)([-~:]L(?P<end_line>\d+))?)'
)