aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/info/codeblock/_parsing.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/exts/info/codeblock/_parsing.py b/bot/exts/info/codeblock/_parsing.py
index e67224494..a98218dfb 100644
--- a/bot/exts/info/codeblock/_parsing.py
+++ b/bot/exts/info/codeblock/_parsing.py
@@ -208,6 +208,10 @@ def _fix_indentation(content: str) -> str:
first_indent = _get_leading_spaces(content)
first_line = lines[0][first_indent:]
+ # Can't assume there'll be multiple lines cause line counts of edited messages aren't checked.
+ if len(lines) == 1:
+ return first_line
+
second_indent = _get_leading_spaces(lines[1])
# If the first line ends with a colon, all successive lines need to be indented one