diff options
| -rw-r--r-- | bot/exts/info/code_snippets.py | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/info/code_snippets.py b/bot/exts/info/code_snippets.py index e825ec513..4c8de05fc 100644 --- a/bot/exts/info/code_snippets.py +++ b/bot/exts/info/code_snippets.py @@ -14,7 +14,7 @@ log = logging.getLogger(__name__)  GITHUB_RE = re.compile(      r'https://github\.com/(?P<repo>[a-zA-Z0-9-]+/[\w.-]+)/blob/' -    r'(?P<path>[^#>]+/{0,1})(\?[^#>]+)?(#L(?P<start_line>\d+)([-~:]L(?P<end_line>\d+))?)' +    r'(?P<path>[^#>]+)(\?[^#>]+)?(#L(?P<start_line>\d+)([-~:]L(?P<end_line>\d+))?)'  )  GITHUB_GIST_RE = re.compile( @@ -26,13 +26,13 @@ GITHUB_GIST_RE = re.compile(  GITHUB_HEADERS = {'Accept': 'application/vnd.github.v3.raw'}  GITLAB_RE = re.compile( -    r'https://gitlab\.com/(?P<repo>[\w.-]+/[\w.-]+)/\-/blob/(?P<path>[^#>]+/{0,1})' +    r'https://gitlab\.com/(?P<repo>[\w.-]+/[\w.-]+)/\-/blob/(?P<path>[^#>]+)'      r'(\?[^#>]+)?(#L(?P<start_line>\d+)(-(?P<end_line>\d+))?)'  )  BITBUCKET_RE = re.compile( -    r'https://bitbucket\.org/(?P<repo>[a-zA-Z0-9-]+/[\w.-]+?)/src/(?P<ref>[0-9a-zA-Z]+?)' -    r'/(?P<file_path>[^#>]+?)(\?[^#>]+)?(#lines-(?P<start_line>\d+)(:(?P<end_line>\d+))?)' +    r'https://bitbucket\.org/(?P<repo>[a-zA-Z0-9-]+/[\w.-]+)/src/(?P<ref>[0-9a-zA-Z]+)' +    r'/(?P<file_path>[^#>]+)(\?[^#>]+)?(#lines-(?P<start_line>\d+)(:(?P<end_line>\d+))?)'  )  |