Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANSITable colsep not applied on left side of first column #7

Closed
erhhung opened this issue Jul 28, 2023 · 0 comments
Closed

ANSITable colsep not applied on left side of first column #7

erhhung opened this issue Jul 28, 2023 · 0 comments

Comments

@erhhung
Copy link

erhhung commented Jul 28, 2023

When a table border is shown, no matter what the header or column alignment is set to for the first, left-most, column, the colsep setting, which should be better known as "padding", does not get applied on the left side of that column. For other columns, this setting appears to be working fine.

image

from ansitable import ANSITable, Column # ansitable 0.9.7

table = ANSITable(
  Column("Column 1", headalign="<", headcolor="white", headstyle="bold", headbgcolor="blue",
                      colalign="<",  colcolor="white",  colstyle="bold",  colbgcolor="blue"),
  Column("Column 2", headalign="^", headcolor="white", headstyle="bold", headbgcolor="blue",
                      colalign="<",  colcolor="light_magenta",            colbgcolor="blue"),
  Column("Date",     headalign="^", headcolor="white", headstyle="bold", headbgcolor="blue",
                      colalign="^",  colcolor="chartreuse_3b"),
  border="thick", bordercolor="cornflower_blue", colsep=4,
)
table.row("hello-world", "1.0.0", "2023-07-28")
table.row("foo-bar",     "0.1.0", "2023-07-28")
table.print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants