mirror of
https://github.com/Open-Argon/Argon.git
synced 2026-10-28 09:43:38 +00:00
fix incorrect boxify alignment and compile for macos
This commit is contained in:
1 parent
e4bd9247cb
commit
12bca00f05
4 files changed
+3
-2
No files matched your search
@@ -37,7 +37,7 @@ def boxify(text, length=0, align="left"):
|
||||
processed = []
|
||||
for i in range(len(textsplit)):
|
||||
processed.append('║ ' + (" "*(length-len(textsplit[i]) if align == 'right' else math.floor((length-len(textsplit[i]))/2) if align == 'center' else 0)) +
|
||||
textsplit[i] + (" "*(length-len(textsplit[i]) if align == 'right' else math.ceil((length-len(textsplit[i]))/2) if align == 'center' else 0)) + ' ║')
|
||||
textsplit[i] + (" "*(length-len(textsplit[i]) if align == 'left' else math.ceil((length-len(textsplit[i]))/2) if align == 'center' else 0)) + ' ║')
|
||||
return ('╔'+((length+2)*'═')+'╗\n'+("\n".join(processed))+'\n╚'+((length+2)*'═')+'╝')
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user