Skip to content

Commit

Permalink
Merge pull request #1765 from pfitzseb/sp/juno2
Browse files Browse the repository at this point in the history
honour `html_output_format` in Juno
  • Loading branch information
mkborregaard authored Sep 27, 2018
2 parents 732103a + ec80848 commit acb9faa
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/output.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit acb9faa

Please sign in to comment.