[commands] Strip text to remove spaces before ellipsis

This commit is contained in:
Kreusada 2021-04-11 20:19:45 +01:00 committed by GitHub
parent 7cbe942a64
commit af5964358d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -931,7 +931,7 @@ class DefaultHelpCommand(HelpCommand):
def shorten_text(self, text):
""":class:`str`: Shortens text to fit into the :attr:`width`."""
if len(text) > self.width:
return text[:self.width - 3] + '...'
return text[:self.width - 3].rstrip() + '...'
return text
def get_ending_note(self):