From 9e0085a65ec783a1aa6268b79310f990b1818d40 Mon Sep 17 00:00:00 2001 From: Shadow15510 Date: Tue, 11 Jan 2022 21:49:20 +0100 Subject: [PATCH] Fix bug on 'print_text' --- asci.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asci.py b/asci.py index 5e21691..7f26b1f 100644 --- a/asci.py +++ b/asci.py @@ -1,4 +1,4 @@ -# Asci (version 1.6.0) +# Asci (version 1.6.1) class Screen: def __init__(self, screen_width=21, screen_height=6): @@ -247,7 +247,7 @@ def text_formater(string, screen_width=21, screen_height=6): while stop_index > 0 and not string[stop_index].isspace(): stop_index -= 1 if not stop_index: stop_index = screen_width - return string[:stop_index] + "\n" + line_formater(string[stop_index + 1:], screen_width) + return string[:stop_index].strip() + "\n" + line_formater(string[stop_index:].strip(), screen_width) def paragraph_formater(lines, screen_height): if len(lines) < screen_height: return "\n".join(lines)