mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Make bordered() use + for corners if ascii_border=True (#4097)
This commit is contained in:
parent
5fba9bc4ed
commit
8c484f86a9
@ -165,10 +165,10 @@ def bordered(*columns: Sequence[str], ascii_border: bool = False) -> str:
|
||||
|
||||
"""
|
||||
borders = {
|
||||
"TL": "-" if ascii_border else "┌", # Top-left
|
||||
"TR": "-" if ascii_border else "┐", # Top-right
|
||||
"BL": "-" if ascii_border else "└", # Bottom-left
|
||||
"BR": "-" if ascii_border else "┘", # Bottom-right
|
||||
"TL": "+" if ascii_border else "┌", # Top-left
|
||||
"TR": "+" if ascii_border else "┐", # Top-right
|
||||
"BL": "+" if ascii_border else "└", # Bottom-left
|
||||
"BR": "+" if ascii_border else "┘", # Bottom-right
|
||||
"HZ": "-" if ascii_border else "─", # Horizontal
|
||||
"VT": "|" if ascii_border else "│", # Vertical
|
||||
}
|
||||
|
||||
@ -55,11 +55,11 @@ def test_bordered_asymmetrical_2():
|
||||
def test_bordered_ascii():
|
||||
expected = textwrap.dedent(
|
||||
"""\
|
||||
---------------- ---------------
|
||||
+--------------+ +-------------+
|
||||
|one | |four |
|
||||
|two | |five |
|
||||
|three | |six |
|
||||
---------------- ---------------"""
|
||||
+--------------+ +-------------+"""
|
||||
)
|
||||
col1, col2 = ["one", "two", "three"], ["four", "five", "six"]
|
||||
assert chat_formatting.bordered(col1, col2, ascii_border=True) == expected
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user