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

Uneven edge of the CLI table #90

Closed
RobinTail opened this issue Sep 6, 2023 · 3 comments
Closed

Uneven edge of the CLI table #90

RobinTail opened this issue Sep 6, 2023 · 3 comments
Labels

Comments

@RobinTail
Copy link

RobinTail commented Sep 6, 2023

Not a big issue, but I was wondering why it looks like this having so advanced libraries used for the CLI formatting and colorizing.
My best guess is that emojies are UTF-16, while the tool making paddings only accepts UTF-8.
Perhaps there should be some special method that can figure out UTF-16 string length in order to make correct paddings.

image

It's also interesting that the space after green circle is only visible when I copy/paste the text from the console.
I'm using iTerm2.

┌───────────────────┬───────────────────┐
│                   │ "express-zod-api" │
├───────────────────┼───────────────────┤
│ node10            │ 🟢                │
├───────────────────┼───────────────────┤
│ node16 (from CJS) │ 🟢 (CJS)          │
├───────────────────┼───────────────────┤
│ node16 (from ESM) │ 🟢 (ESM)          │
├───────────────────┼───────────────────┤
│ bundler           │ 🟢                │
└───────────────────┴───────────────────┘
@andrewbranch
Copy link
Collaborator

I have also noticed this and it bugs me, but not enough to try to track down a fix in cli-table3. https://github.com/cli-table/cli-table3. Maybe a small repro there would gain some traction. I’d love to pick up a fix but don’t have time to do it myself.

@andrewbranch andrewbranch closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2023
@RobinTail
Copy link
Author

Fixed in v0.13.0, @andrewbranch

image

@andrewbranch
Copy link
Collaborator

Huhmmm, if that’s true, I guess it wasn’t cli-table3 because they haven’t had any new releases: https://github.com/cli-table/cli-table3/releases. In 0.13 I switched to pnpm and wiped the npm lockfile, so I have no idea what it was!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants