Merge pull request #1765 from pfitzseb/sp/juno2

honour `html_output_format` in Juno
This commit is contained in:
Michael Krabbe Borregaard 2018-09-27 21:12:19 +02:00 committed by GitHub
commit acb9faa6e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -267,9 +267,21 @@ function showjuno(io::IO, m, plt)
plt[:thickness_scaling] *= scale
prepare_output(plt)
_show(io, m, plt)
plt[:size] = sz
plt[:dpi] = dpi
plt[:thickness_scaling] = thickness_scaling
try
_showjuno(io, m, plt)
finally
plt[:size] = sz
plt[:dpi] = dpi
plt[:thickness_scaling] = thickness_scaling
end
end
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)