Skip to content

Commit 4a5195a

Browse files
committed
fix display detection for 0.6 (closes #281)
1 parent 3cbfe1a commit 4a5195a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/init.jl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,9 @@ const aggformats = Dict("application/eps" => "eps",
3333
"application/postscript" => "ps",
3434
"image/svg+xml" => "svg")
3535

36-
function isdisplayok()
37-
for mime in keys(aggformats)
38-
if displayable(mime)
39-
return true
40-
end
41-
end
42-
false
43-
end
36+
# In 0.6, TextDisplay can show e.g. image/svg+xml as text (#281).
37+
# Any "real" graphical display should support PNG, I hope.
38+
isdisplayok() = displayable(MIME("image/png"))
4439

4540
###########################################################################
4641
# We allow the user to turn on or off the Python gui interactively via

0 commit comments

Comments
 (0)