-
Notifications
You must be signed in to change notification settings - Fork 7
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
Tibble vignette breaks after switching to bench #54
Comments
This is probably a Min reprex:
These don't cause errors. Probably something to do with the line ending in a '38;5' color. Obviously should work anyway.
|
Truly minimal:
|
Thanks. The following works for me: fansi::sgr_to_html(paste(string, collapse = "-")) I'm using |
The problem is that I implicitly assumed that styles would be terminated on each line and explicitly restarted on the next line for By "I'm using |
Aside, your |
Thanks. It can be a valid assumption to treat elements of a character vector as separate entities. The problem then becomes to understand how/why this input occurs. |
So I'm pretty sure this is happening because of tidyverse/tibble@d9c7a6d#diff-bd44a49c00a28d3d5e258721243da56aR22 where the strings are split with newlines thereby creating vector elements with active SGR at the end of the element. This should still work, but I posted a potential workaround to the PR until I fix it (soon, hopefully). Another possible work-around that seems to work is to use |
So this is now fixed in the development branch. The second work-around I proposed does not actually work because of #55. That too will be fixed in the near future. |
Thanks. I'm more than happy to switch to |
Note that Re |
FWIW, this is what it looks like with the set_hooks business, and using styles for the error output coloring: The drawback of this approach is you lose the control on how stuff is formatted. This is on my fork: |
which prints tibbles that are formatted with
fansi::sgr_to_html()
.Travis CI asks to contact the maintainer, "no state in first span": https://github.com/tidyverse/tibble/pull/469/files#r212818510. Could be that this is a problem in how pillar or tibble colorize their output, not sure.
To reproduce, clone the
name-repair
branch from tidyverse/tibble and uncomment line 46 intibble.Rmd
.The text was updated successfully, but these errors were encountered: