Term.jl icon indicating copy to clipboard operation
Term.jl copied to clipboard

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

Open behinger opened this issue 1 year ago • 1 comments

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 avatar Jul 10 '24 09:07 behinger

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

behinger avatar Nov 03 '24 20:11 behinger