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

[BUG] Handle minimum table width for multi-column utf-8 characters #53

Closed
Nukesor opened this issue Oct 29, 2021 · 1 comment
Closed
Labels
f: wontfix This will not be worked on t: bug Something isn't working

Comments

@Nukesor
Copy link
Owner

Nukesor commented Oct 29, 2021

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!

@Nukesor Nukesor added t: bug Something isn't working f: help wanted Extra attention is needed labels Jan 6, 2023
@Nukesor Nukesor changed the title Handle minimum table width for multi-column utf-8 characters [BUG] Handle minimum table width for multi-column utf-8 characters Jan 6, 2023
@Nukesor
Copy link
Owner Author

Nukesor commented May 26, 2023

After a lot of consideration, this is an edge-case that's considered acceptable.

This will need a lot of additional checks and it will most likely never happen. If it happens, it's easily fixable by adding a Constraint with the minimum length of 2 on this column.

@Nukesor Nukesor closed this as completed May 26, 2023
@Nukesor Nukesor added f: wontfix This will not be worked on and removed f: help wanted Extra attention is needed labels May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: wontfix This will not be worked on t: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant