Skip to content

Commit

Permalink
Use the html tag for text/html
Browse files Browse the repository at this point in the history
This fixes the interactivity of Gadfly plots on Pluto, solving the Gadfly example in fonsp/Pluto.jl#546 and this [stackoverflow question](https://stackoverflow.com/questions/66297678/using-gadfly-interactively-in-pluto).
  • Loading branch information
diegozea authored Jul 11, 2021
1 parent da671cd commit 3dbc5a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/svg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,12 @@ function show(io::IO, ::MIME"text/html", img::SVG)
if img.cached_out === nothing
img.cached_out = String(take!(img.out))
end
write(io, img.cached_out)
write(io,
"""
<html>
$(img.cached_out)
</html>
""")
end

function show(io::IO, ::MIME"image/svg+xml", img::SVG)
Expand Down

0 comments on commit 3dbc5a0

Please sign in to comment.