Term.jl
Term.jl copied to clipboard
Term.jl + Pluto.jl / MIME"text/html"
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
- Is there any way to automatically convert the repl-styled printing to html for Pluto?
- my "hack" right now is to get the
is_plutocontext, and if true, enforce Base.stdout - but that is not super nice, potential, I could combine this withPlutoUI.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
just adding here - the same is true for Documenter.jl - any hints highly appreciated