Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call showable in correct world age #187

Merged
merged 1 commit into from
Feb 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Literate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -569,15 +569,15 @@ function execute_markdown!(io::IO, sb::Module, block::String, outputdir;
plain_fence = "\n````\n" => "\n````"
if r !== nothing && !REPL.ends_with_semicolon(block)
if (flavor isa FranklinFlavor || flavor isa DocumenterFlavor) &&
showable(MIME("text/html"), r)
Base.invokelatest(showable, MIME("text/html"), r)
htmlfence = flavor isa FranklinFlavor ? ("~~~" => "~~~") : ("```@raw html" => "```")
write(io, "\n", htmlfence.first, "\n")
Base.invokelatest(show, io, MIME("text/html"), r)
write(io, "\n", htmlfence.second, "\n")
return
end
for (mime, ext) in image_formats
if showable(mime, r)
if Base.invokelatest(showable, mime, r)
file = string(hash(block) % UInt32) * ext
open(joinpath(outputdir, file), "w") do io
Base.invokelatest(show, io, mime, r)
Expand All @@ -586,7 +586,7 @@ function execute_markdown!(io::IO, sb::Module, block::String, outputdir;
return
end
end
if showable(MIME("text/markdown"), r)
if Base.invokelatest(showable, MIME("text/markdown"), r)
write(io, '\n')
Base.invokelatest(show, io, MIME("text/markdown"), r)
write(io, '\n')
Expand Down