diff options
| author | 2021-01-24 20:06:20 +0200 | |
|---|---|---|
| committer | 2021-01-24 20:06:20 +0200 | |
| commit | 64596679aeed67a0bfdb645ade5065af129c8c56 (patch) | |
| tree | cbd1bef0af61bc11adbc1b67005bdbbefc7e73f6 | |
| parent | Add matching for query params to all the regexes (diff) | |
Match both username *and* repo in the GitLab regex
| -rw-r--r-- | bot/exts/info/code_snippets.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/info/code_snippets.py b/bot/exts/info/code_snippets.py index 3f943aea8..e825ec513 100644 --- a/bot/exts/info/code_snippets.py +++ b/bot/exts/info/code_snippets.py @@ -26,7 +26,7 @@ GITHUB_GIST_RE = re.compile( GITHUB_HEADERS = {'Accept': 'application/vnd.github.v3.raw'} GITLAB_RE = re.compile( - r'https://gitlab\.com/(?P<repo>[a-zA-Z0-9-]+?)/\-/blob/(?P<path>[^#>]+/{0,1})' + r'https://gitlab\.com/(?P<repo>[\w.-]+/[\w.-]+)/\-/blob/(?P<path>[^#>]+/{0,1})' r'(\?[^#>]+)?(#L(?P<start_line>\d+)(-(?P<end_line>\d+))?)' ) |