diff --git a/src/output.jl b/src/output.jl index 16494fda8..1122ab93a 100644 --- a/src/output.jl +++ b/src/output.jl @@ -267,9 +267,21 @@ function showjuno(io::IO, m, plt) plt[:thickness_scaling] *= scale prepare_output(plt) - _show(io, m, plt) + try + _showjuno(io, m, plt) + finally + plt[:size] = sz + plt[:dpi] = dpi + plt[:thickness_scaling] = thickness_scaling + end +end - plt[:size] = sz - plt[:dpi] = dpi - plt[:thickness_scaling] = thickness_scaling +function _showjuno(io::IO, m::MIME"image/svg+xml", plt) + if Symbol(plt.attr[:html_output_format]) ≠ :svg + throw(MethodError(show, (typeof(m), typeof(plt)))) + else + _show(io, m, plt) + end end + +_showjuno(io::IO, m, plt) = _show(io, m, plt)