Is your feature request related to a problem? Please describe.
I have a CLI that supports 3 table formats: plain (HiddenBorder), basic (RoundedBorder), and markdown (??). I used lipgloss/table to build a table and would like to output it in all those formats.
Is your feature request related to a problem? Please describe.
I have a CLI that supports 3 table formats: plain (HiddenBorder), basic (RoundedBorder), and markdown (??). I used
lipgloss/table
to build a table and would like to output it in all those formats.Output examples
### Plain ``` Status Elapsed Package Cover Pass Fail Skip PASS (cached) github.com/mfridman/tparse/internal/utils -- 12 0 0 PASS (cached) github.com/mfridman/tparse/parse -- 43 0 0 PASS (cached) github.com/mfridman/tparse/tests -- 137 0 0 ``` ### Basic (poorly named, "with border") ``` ╭────────┬──────────┬───────────────────────────────────────────┬───────┬──────┬──────┬──────╮ │ Status │ Elapsed │ Package │ Cover │ Pass │ Fail │ Skip │ ├────────┼──────────┼───────────────────────────────────────────┼───────┼──────┼──────┼──────┤ │ PASS │ (cached) │ github.com/mfridman/tparse/internal/utils │ -- │ 12 │ 0 │ 0 │ │ PASS │ (cached) │ github.com/mfridman/tparse/parse │ -- │ 43 │ 0 │ 0 │ │ PASS │ (cached) │ github.com/mfridman/tparse/tests │ -- │ 137 │ 0 │ 0 │ ╰────────┴──────────┴───────────────────────────────────────────┴───────┴──────┴──────┴──────╯ ``` ### Markdown ``` | Status | Elapsed | Package | Cover | Pass | Fail | Skip | |---------|----------|-------------------------------------------|-------|------|------|------| | 🟢 PASS | (cached) | github.com/mfridman/tparse/internal/utils | -- | 12 | 0 | 0 | | 🟢 PASS | (cached) | github.com/mfridman/tparse/parse | -- | 43 | 0 | 0 | | 🟢 PASS | (cached) | github.com/mfridman/tparse/tests | -- | 137 | 0 | 0 | ```Describe the solution you'd like
I'd be nice if there was a
lipglosss.MarkdownBorder()
, which would allow converting a lipgloss table into a renderable markdown table.Describe alternatives you've considered
This did the trick for me:
Additional context
This might be overly specific, but opening this up for discussion and/or if someone else finds this useful.