diff --git a/src/ImageShow.jl b/src/ImageShow.jl index 5c8d7bc..a3ebb80 100644 --- a/src/ImageShow.jl +++ b/src/ImageShow.jl @@ -9,6 +9,13 @@ using StackViews using ImageCore.MappedArrays using ImageCore.PaddedViews +# opt-in HTML render for image +# work around https://github.com/JuliaImages/ImageShow.jl/pull/50#issuecomment-1124132500 +const _ENABLE_HTML = Ref(false) +enable_html_render() = _ENABLE_HTML[] = true +disable_html_render() = _ENABLE_HTML[] = false +Base.showable(::MIME"text/html", ::AbstractMatrix{<:Colorant}) = _ENABLE_HTML[] + include("showmime.jl") include("gif.jl") include("multipage.jl") diff --git a/test/runtests.jl b/test/runtests.jl index 6b95b7c..c32d32c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,6 @@ using Test +using ImageShow +ImageShow.enable_html_render() @testset "ImageShow" begin include("writemime.jl")