python-tabulate icon indicating copy to clipboard operation
python-tabulate copied to clipboard

SEPARATING_LINE does not work with "outline" formats

Open GuidoBartoli opened this issue 1 year ago • 1 comments

The SEPARATING_LINE macro works only with the default style.

This is the sample data:

table = [
    ["A", 1, 2],
    ["B", 3, 4],
    SEPARATING_LINE,
    ["C", 5, 6],
    ["D", 7, 8],
]

Printing with the default style produces the correct output:

print(tabulate(table))

-  -  -
A  1  2
B  3  4
-  -  -
C  5  6
D  7  8
-  -  -

Using the outline format gives wrong output instead:

print(tabulate(table, tablefmt="outline"))

+---+---+---+
| A | 1 | 2 |
| B | 3 | 4 |
|  |
| C | 5 | 6 |
| D | 7 | 8 |
+---+---+---+

GuidoBartoli avatar Apr 17 '24 12:04 GuidoBartoli

It also doesn't work with html format. It seems to cause the table to end.

zellyn avatar May 09 '24 18:05 zellyn