aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-05-03 20:44:15 -0700
committerGravatar MarkKoz <[email protected]>2020-06-13 11:21:04 -0700
commitb914d236b8129ae2616424629922db81a79eeead (patch)
treed4958b3855c9a038b040995ed9ed688f422fa486
parentCode block: use a more efficient line count check (diff)
Code block: fix code block language regex
It was missing a quantifier to match more than 1 character.
-rw-r--r--bot/cogs/codeblock/cog.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/codeblock/cog.py b/bot/cogs/codeblock/cog.py
index 6699abd2f..cde16bd9f 100644
--- a/bot/cogs/codeblock/cog.py
+++ b/bot/cogs/codeblock/cog.py
@@ -15,7 +15,7 @@ from bot.utils.messages import wait_for_deletion
log = logging.getLogger(__name__)
RE_MARKDOWN = re.compile(r'([*_~`|>])')
-RE_CODE_BLOCK_LANGUAGE = re.compile(r"```(?:[^\W_])\n(.*?)```", re.DOTALL)
+RE_CODE_BLOCK_LANGUAGE = re.compile(r"```(?:[^\W_]+)\n(.*?)```", re.DOTALL)
INVALID_BACKTICKS = {
"'''",
'"""',