-
Notifications
You must be signed in to change notification settings - Fork 87
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
Hyperlinks break width detection #26
Comments
Hi @maxbla thank you for opening the issue. Could you please switch on tabled = { version = "*", features = ["color"] } |
Yep, that completely fixed it. Dang, rust has a problem with features discoverability. Anyhow thanks for the library and the help. |
Great 💯
I'd agree I think maybe it's worthwhile to add a ansi sequence block/comment in By the way If you @maxbla don't mind I'd like to hear your opinion on 2 questions.
|
I don't like just As for whether the feature should be enabled by default, I think not. Of your 5 listed reverse-dependencies on crates.io, only one uses the color feature (qcow-cli) so you would be adding a significant overhead for no benefit to most of your users. You could re-evaluate your reverse dependencies later, as they might change in the future. |
Added another example, a link and hopefully larger surface area for people searching for a solution for working with colors inside a table. Took me quite a while to find that feature as i've searched for: * broken ansi * color in cell * bad layout and other search terms, just to hit issue zhiburt#26 which deals with _hyperlinks_ ansi, but describes the problem well. After I've used the color feature, everything works like magic!
Added another example, a link and hopefully larger surface area for people searching for a solution for working with colors inside a table. Took me quite a while to find that feature as i've searched for: * broken ansi * color in cell * bad layout and other search terms, just to hit issue #26 which deals with _hyperlinks_ ansi, but describes the problem well. After I've used the color feature, everything works like magic!
Following instructions in this gist, the way to print a hyperlink in the terminal with rust is something like
format!("\x1b]8;;{}\x1b\\{}\x1b]8;;\x1b\\", display, url)
which displays in the terminal as having widthdisplay.len()
, but tabled appears to think its display width is approximately14+display.len()+url.len()
. This and others are listed in the operating system command section of the relevant wikipedia page.An example of the results
after glancing at some docs, I think the underlying issue is with ansi-parser
The text was updated successfully, but these errors were encountered: