aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2019-11-10 20:03:48 +0100
committerGravatar Numerlor <[email protected]>2019-11-10 20:03:48 +0100
commit34510f52c6bbe5e2a8bbfc34f8e5d648d0d39a96 (patch)
tree3e7b62d4d2d4b638aa3f361a73ca268f6b3d7dfa
parentCut off description at 1000 chars if paragraph is not found (diff)
Move paragraph search to not cut off long starting paragraphs
Co-authored-by: scargly <[email protected]>
-rw-r--r--bot/cogs/doc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/doc.py b/bot/cogs/doc.py
index b04355e28..73895e3eb 100644
--- a/bot/cogs/doc.py
+++ b/bot/cogs/doc.py
@@ -304,7 +304,7 @@ class Doc(commands.Cog):
# of a double newline (interpreted as a paragraph) before index 1000.
if len(description) > 1000:
shortened = description[:1000]
- last_paragraph_end = shortened.rfind('\n\n')
+ last_paragraph_end = shortened.rfind('\n\n', 100)
if last_paragraph_end == -1:
last_paragraph_end = 1000
description = description[:last_paragraph_end]