DisplayAs.jl provides functions to show objects in a chosen MIME type.
julia> using DisplayAs
using Markdown
julia> md_as_html = Markdown.parse("hello") |> DisplayAs.HTML;
julia> showable("text/html", md_as_html)
true
julia> showable("text/markdown", md_as_html)
false
julia> md_as_md = Markdown.parse("hello") |> DisplayAs.MD;
julia> showable("text/html", md_as_md)
false
julia> showable("text/markdown", md_as_md)
true