aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-05-07 20:46:09 -0700
committerGravatar MarkKoz <[email protected]>2020-06-13 11:21:08 -0700
commit7b2fff794907fed5e000998e876b7326fb938ca8 (patch)
treeae943a18f5637d91bde466aeabc8f6dedbc70551
parentCode block: don't return bad language instructions if nothing's wrong (diff)
Code block: fix wrong message shown for bad ticks with a valid language
When the code block had invalid ticks, instructions for syntax highlighting were being shown despite the code block having a valid language.
-rw-r--r--bot/cogs/codeblock/instructions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/codeblock/instructions.py b/bot/cogs/codeblock/instructions.py
index 0c97d2ad4..880572d58 100644
--- a/bot/cogs/codeblock/instructions.py
+++ b/bot/cogs/codeblock/instructions.py
@@ -43,7 +43,7 @@ def _get_bad_ticks_message(code_block: parsing.CodeBlock) -> Optional[str]:
log.trace("Check if the bad ticks code block also has issues with the language specifier.")
addition_msg = _get_bad_lang_message(code_block.content)
- if not addition_msg:
+ if not addition_msg and not code_block.language:
addition_msg = _get_no_lang_message(code_block.content)
# Combine the back ticks message with the language specifier message. The latter will