comfy-table
comfy-table copied to clipboard
Handle minimum table width for multi-column utf-8 characters
This is a follow-up issue to #44.
By default, if there's not enough space and dynamic mode is active, comfy-table falls back to a column with minimum-width of 1
.
However, if there are multi-column characters in the text, the format will break as the character doesn't fit into the line.
Example:
╭───╮
│ │
├╌╌╌┤
│ ⺀ │
╰───╯
This is a super rare edge-case and this will need quite a bit of special logic to be properly handled. This includes iterating through all characters of a column.
I'm not sure if it's worth doing it. However, it's probably better to do so, even if it's just for the sake of consistency and correctness.
This behavior will also show up if the user enforces a width of 1
for a column, but this is something we won't handle!