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

Line break in print output of wide tibbles #1957

Closed
urswilke opened this issue Dec 7, 2021 · 5 comments
Closed

Line break in print output of wide tibbles #1957

urswilke opened this issue Dec 7, 2021 · 5 comments

Comments

@urswilke
Copy link

urswilke commented Dec 7, 2021

Using the new bootstrap 5, it seems that the print output of tibbles is a tiny bit too long. Thus line breaks occur at all the printed lines of the tibble's values.

See for example the tibble print in this section here:

https://urswilke.github.io/ggbenjamini/index.html#branches

@hadley
Copy link
Member

hadley commented Dec 7, 2021

You can set the width with the new

code
  width: 68

@hadley hadley closed this as completed Dec 7, 2021
@urswilke
Copy link
Author

urswilke commented Dec 7, 2021

Thanks!

But this doesn't affect the README. I added a chunk with

```{r set-options, echo=FALSE}
options(width = 68)
```

to also reduce the line width of the print output there.

@hadley
Copy link
Member

hadley commented Dec 7, 2021

I get what you mean now — it's annoying that the defaults cause wrapping.

@hadley hadley reopened this Dec 7, 2021
@zkamvar
Copy link
Contributor

zkamvar commented Dec 16, 2021

I think the solution is to change white-space: pre-wrap to white-space: pre on line 377

pre, pre code {
white-space: pre-wrap;
word-break: break-all;
overflow-wrap: break-word;
}

pre will only break at newlines and <br> elements according to the white-space docs whereas pre-wrap will also consider the size of the container.

@hadley
Copy link
Member

hadley commented Jan 6, 2022

Duplicate of #1940. The plan is to fix this in the next release.

@hadley hadley closed this as completed Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants