diff options
author | 2021-02-27 02:52:05 +0100 | |
---|---|---|
committer | 2021-02-27 02:52:05 +0100 | |
commit | 41cfe3f805e53c43ec18585d203e0b80ed59afda (patch) | |
tree | bacbb381cb6581d2aeab240a72292611ab3e7d0f | |
parent | Use 4 spaces for hanging indent (diff) |
Get the last index instead of using max
The last index will always be the largest one so there's no need
for max to search for it
-rw-r--r-- | bot/exts/info/doc/_parsing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/info/doc/_parsing.py b/bot/exts/info/doc/_parsing.py index 6b2d31cdd..b422b4f24 100644 --- a/bot/exts/info/doc/_parsing.py +++ b/bot/exts/info/doc/_parsing.py @@ -190,7 +190,7 @@ def _get_truncated_description( truncated_result = textwrap.shorten(result, truncate_index) else: # Truncate at the last Markdown element that comes before the truncation index. - markdown_truncate_index = max(possible_truncation_indices) + markdown_truncate_index = possible_truncation_indices[-1] truncated_result = result[:markdown_truncate_index] return truncated_result.strip(_TRUNCATE_STRIP_CHARACTERS) + "..." |