Skip to content

Commit

Permalink
PlutoRunner: only use vector viewer if eltype(eachindex(x)) === Int
Browse files Browse the repository at this point in the history
Fix #806
  • Loading branch information
fonsp committed Jan 30, 2022
1 parent 0e4cc35 commit 2239865
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runner/PlutoRunner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ pluto_showable(m::MIME, @nospecialize(x))::Bool = Base.invokelatest(showable, m,


# We invent our own MIME _because we can_ but don't use it somewhere else because it might change :)
pluto_showable(::MIME"application/vnd.pluto.tree+object", ::AbstractArray{<:Any,1}) = true
pluto_showable(::MIME"application/vnd.pluto.tree+object", x::AbstractArray{<:Any,1}) = eltype(eachindex(x)) === Int
pluto_showable(::MIME"application/vnd.pluto.tree+object", ::AbstractSet{<:Any}) = true
pluto_showable(::MIME"application/vnd.pluto.tree+object", ::AbstractDict{<:Any,<:Any}) = true
pluto_showable(::MIME"application/vnd.pluto.tree+object", ::Tuple) = true
Expand Down

0 comments on commit 2239865

Please sign in to comment.