-
Notifications
You must be signed in to change notification settings - Fork 74
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
Cell width incorrect when using external formatting #165
Comments
Probably this: Needs re-work - wanna do and send a patch that contains proper testing of it ? |
I've got into the same issue after Adding |
Pinning dependencies asks for trouble e.g. duplication etc. It needs to be addressed here as compat issue if so. Someone just has to work on it and submit a patch. |
… in prettytable-rs when using cell containing string formatted with Colored crate. Summary: I have noticed that recently `metalctl` CLI started rendering table with wrong cells widths: {F1946659102} After looking around I found this [Issue](phsym/prettytable-rs#165) reported exactly the same problem. In `metalos` we **do** use Colored crate: https://www.internalfb.com/code/fbsource/[769b00238690]/fbcode/metalos/metald/if/rust/src/api.rs?lines=206-220 And this messes up with the width. An user in that GH issue reported pinning unicode-width to 0.1.12 works around the problem hence this is what I am doing this. This started happening after `unicode-width` got bumped in tp2 from `0.1.12` to `0.1.14` on the 21st of October: https://www.internalfb.com/phabricator/commit/FBS/7c9387478e0a3a1d1876ec4a5a17599510994711 I am aware pinning dependencies asks for trouble e.g. duplication etc. We can remove the pin after this issue is fixed in `prettytable-rs` and I added a comment about that in Cargo.toml Differential Revision: D64960800 fbshipit-source-id: 7fa29b15b1cae7d5a0f75a44f0d4f221e78c7a91
… in prettytable-rs when using cell containing string formatted with Colored crate. Summary: I have noticed that recently `metalctl` CLI started rendering table with wrong cells widths: {F1946659102} After looking around I found this [Issue](phsym/prettytable-rs#165) reported exactly the same problem. In `metalos` we **do** use Colored crate: https://www.internalfb.com/code/fbsource/[769b00238690]/fbcode/metalos/metald/if/rust/src/api.rs?lines=206-220 And this messes up with the width. An user in that GH issue reported pinning unicode-width to 0.1.12 works around the problem hence this is what I am doing this. This started happening after `unicode-width` got bumped in tp2 from `0.1.12` to `0.1.14` on the 21st of October: https://www.internalfb.com/phabricator/commit/FBS/7c9387478e0a3a1d1876ec4a5a17599510994711 I am aware pinning dependencies asks for trouble e.g. duplication etc. We can remove the pin after this issue is fixed in `prettytable-rs` and I added a comment about that in Cargo.toml Differential Revision: D64960800 fbshipit-source-id: 7fa29b15b1cae7d5a0f75a44f0d4f221e78c7a91
…rn unicode-width versions Fixes phsym#165
@pinkforest, please take a look at #170. |
This has already been discussed in #46 and it seemed as if this got resolved. However, it seems as if this is still an issue / reoccurred.
Here's an example when using the
colored
crate:running this results in the following table:
you can see at the end the cell is one character too small
The text was updated successfully, but these errors were encountered: