-
Notifications
You must be signed in to change notification settings - Fork 39
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
The HTML backend can fail to print to stdout
#235
Comments
Hi @jakobjpeters ! Yes, I was aware of this problem. The issue is that we need that logic to make environments like Jupyter or Pluto to render the HTML content properly. I have no idea if we can properly fix this issue without compromising how PrettyTables renders in Jupyter, for example. Besides doctests, are there any scenarios that this issue is causing problems? |
Hum, I have no idea. Everything is working in Jupyter (I really do not use Pluto.jl). Maybe Pluto.jl does not use stdout to render HTML content? Anyway, we can definitely improve our support for Pluto.jl here. One thing that we should reach is to support the front ends so that |
Oh! I think I remember this case! Pluto expects an object, that's why we need to pass |
I setup Jupyter and it works as you described. Currently,
Do you have any other ideas? Do you want the behavior to remain as is or would you prefer to change it (such as implementing one of these methods)? |
I think the user would expect that that system renders the HTML table is
Wouldn't this be way too confusing?
It can be an alternative, do you have a suggestion?
I think this is not a correct move. PrettyTables is a package to render tables. It should not have a specific type to "describe" a table.
No, I do not! But I am 100% open to improve the user experience :) |
Thanks for the feedback! I have another idea that I think satisfies both desires.
What do you think? |
I found that writing a doctest using the HTML backend can fail. It was printing to the terminal, rather than whichever IO that Documenter.jl was redirecting to. I think that the issue is caused by this line. Note that the docstring for
display
says that "In general, you cannot assume thatdisplay
output goes tostdout
".In this MWE, the output of
pretty_table
should get written to thepipe
. Instead, it is printed on the terminal.For comparison, here is the redirection working correctly:
The text was updated successfully, but these errors were encountered: