Don't prepare_output for text/plain MIME

This commit is contained in:
yha 2020-09-07 17:33:36 +03:00
parent c392cc1227
commit b91aa2bbfc

View File

@ -194,9 +194,9 @@ function _display(plt::Plot)
@warn("_display is not defined for this backend.") @warn("_display is not defined for this backend.")
end end
Base.show(io::IO, m::MIME"text/plain", plt::Plot) = show(io, plt)
# for writing to io streams... first prepare, then callback # for writing to io streams... first prepare, then callback
for mime in ( for mime in (
"text/plain",
"text/html", "text/html",
"image/png", "image/png",
"image/eps", "image/eps",
@ -221,9 +221,6 @@ end
Base.show(io::IO, m::MIME"application/prs.juno.plotpane+html", plt::Plot) = Base.show(io::IO, m::MIME"application/prs.juno.plotpane+html", plt::Plot) =
showjuno(io, MIME("text/html"), plt) showjuno(io, MIME("text/html"), plt)
# default text/plain for all backends
_show(io::IO, ::MIME{Symbol("text/plain")}, plt::Plot) = show(io, plt)
"Close all open gui windows of the current backend" "Close all open gui windows of the current backend"
closeall() = closeall(backend()) closeall() = closeall(backend())