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

Term.jl + Pluto.jl / MIME"text/html" #254

Open
behinger opened this issue Jul 10, 2024 · 1 comment
Open

Term.jl + Pluto.jl / MIME"text/html" #254

behinger opened this issue Jul 10, 2024 · 1 comment

Comments

@behinger
Copy link

behinger commented Jul 10, 2024

Hi!
I get really beautiful REPL outputs from your package - thanks a ton!

Unfortunately, if I then show my show(io,"text/plain",obj) [...] tprintln(io,"::bla") in Pluto.jl - I get a garbelled mess:

�[38;2;206;147;216m::hello�[39m�[38;2;239;83;80m-�[39mplain

  1. Is there any way to automatically convert the repl-styled printing to html for Pluto?
  2. my "hack" right now is to get the is_pluto context, and if true, enforce Base.stdout - but that is not super nice, potential, I could combine this with PlutoUI.with_terminal(), but it is not the nicest variant (but likely the most realistic one)

MWE

begin
	import Base.show
	using Term
	struct MyTest end
function Base.show(io::IO,obj::MyTest)
	tprintln(io,"::hello-plain")
end
@behinger
Copy link
Author

behinger commented Nov 3, 2024

just adding here - the same is true for Documenter.jl - any hints highly appreciated

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

1 participant