diff --git a/src/display.jl b/src/display.jl index 4fa8100e..e338e5d0 100644 --- a/src/display.jl +++ b/src/display.jl @@ -35,7 +35,8 @@ This is necessary to embed the JSON as is in the displaydata bundle (rather than as stringify'd JSON). """ const ijulia_jsonmime_types = Vector{Union{MIME, Vector{MIME}}}([ - [MIME("application/vnd.vegalite.v2+json"), MIME("application/vnd.vega.v3+json")], + [[MIME("application/vnd.vegalite.v$n+json") for n in 3:-1:2]..., + [MIME("application/vnd.vega.v$n+json") for n in 5:-1:3]...], MIME("application/vnd.dataresource+json"), MIME("application/vnd.plotly.v1+json") ]) @@ -164,4 +165,4 @@ function error_content(e, bt=catch_backtrace(); "traceback" => tb) end -####################################################################### \ No newline at end of file +####################################################################### diff --git a/src/inline.jl b/src/inline.jl index 5a2ef6bb..d5563d57 100644 --- a/src/inline.jl +++ b/src/inline.jl @@ -6,8 +6,8 @@ struct InlineDisplay <: AbstractDisplay end # of preference (descending "richness") const ipy_mime = [ "application/vnd.dataresource+json", - "application/vnd.vegalite.v2+json", - "application/vnd.vega.v3+json", + ["application/vnd.vegalite.v$n+json" for n in 3:-1:2]..., + ["application/vnd.vega.v$n+json" for n in 5:-1:3]..., "application/vnd.plotly.v1+json", "text/html", "text/latex",