Merge pull request #2958 from yha/txt-no-prepare

Don't prepare_output for text/plain MIME
This commit is contained in:
Yuval 2020-09-07 19:05:37 +03:00 committed by GitHub
commit 52cb6fbd3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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())