Closed Xitian9 closed 1 year ago
Here is an overly fancy example from the test suite. It renders better in my terminal.
╭───╥───────────────────┬───────────────────┬────────────┰────────────┬────────────┬────────────┬────────────┰────────────┬────────────╮
│ ║ Some text │ Some numbers │ X ┃ Z │ W │ A │ B ┃ Text │ Y │
╞═══╬═══════════════════╪═══════════════════╪════════════╋════════════╧════════════╪════════════╧════════════╋════════════╧════════════╡
│ 1 ║ This is long text ┆ 4.20000000 ┆ foo ┃ blah bloo ┆ blop blog ┃ Short baz │
│ ║ Short ┆ 200300400500600.2 ┆ bar ┃ yadda yoda ┆ yeeda york ┃ Short wibble │
├───╫┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄╂┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄╂┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┤
│ 2 ║ This is long text ┆ 4.20000000 ┆ foo ┃ bibbidy babbidy ┆ boo blue ┃ Short wobble │
╰───╨───────────────────┴───────────────────┴────────────┸─────────────────────────┴─────────────────────────┸─────────────────────────╯
The end-result looks great, well done. I will have a closer look soon. (Just did some of the simple ones first.)
Anything I can do to help this along?
This addresses some of the points in https://github.com/muesli4/table-layout/issues/20#issuecomment-1060164646. In particular, row headers are now rendered in the table, along with special line styles available within the row header (as there are in the column headers).
I have chosen to display a row header only in the first line of a row group, thus breaking the symmetry between row groups and row headers, so that question has also been resolved.
Also simplifies the creation of new TableStyle from TableStyleSpec, allowing it to handle ASCII tables as well, and creating an even simpler constructor simpleTableStyleSpec.