aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Xithrius <[email protected]>2021-05-10 10:07:39 -0700
committerGravatar GitHub <[email protected]>2021-05-10 10:07:39 -0700
commit880038c61b8c05042593c84b7ce45b22daf9d307 (patch)
tree107811b22853a2d16071711a6fc097fee8df08e8
parentMerge pull request #1579 from python-discord/vcokltfre/tag/dotenv (diff)
parentMerge branch 'main' into snippet-add-two-dots-support (diff)
Merge pull request #1577 from python-discord/snippet-add-two-dots-support
Code snippet: support the two dots syntax
-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 06885410b..24a9ae28a 100644
--- a/bot/exts/info/code_snippets.py
+++ b/bot/exts/info/code_snippets.py
@@ -16,7 +16,7 @@ log = logging.getLogger(__name__)
GITHUB_RE = re.compile(
r'https://github\.com/(?P<repo>[a-zA-Z0-9-]+/[\w.-]+)/blob/'
- r'(?P<path>[^#>]+)(\?[^#>]+)?(#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(