fix: preview line size

This commit is contained in:
starnakin 2023-05-28 00:02:23 +02:00
parent e2870e2ced
commit 4d85721b8a

View File

@ -26,7 +26,7 @@ def preview_formater(title: str, body: str, size_x: int, size_y: int):
out += f"┌── {title} " + "" * (size_x - 6 - len(title)) + "\n" out += f"┌── {title} " + "" * (size_x - 6 - len(title)) + "\n"
lines = body.split("\n"); lines = body.split("\n");
for line in lines[:size_y - 2]: for line in lines[:size_y - 2]:
out += f"{line[: size_x - 4]}" + " " * (size_x - 3 - len(line)) + "\n" out += f"{line[: size_x - 3]}" + " " * (size_x - 3 - len(line)) + "\n"
out += "" + "" * (size_x - 2) + "" out += "" + "" * (size_x - 2) + ""
return (out); return (out);