Skip to content

Commit

Permalink
Support inline html output
Browse files Browse the repository at this point in the history
  • Loading branch information
JackDunnNZ authored Jul 23, 2018
1 parent 8790d38 commit 70a4117
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Expanders.jl
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,8 @@ function Selectors.runner(::Type{ExampleBlocks}, x, page, doc)
# Special-case support for displaying SVG and PNG graphics. TODO: make this more general.
output = if showable(MIME"image/svg+xml"(), result)
Documents.RawHTML(Base.invokelatest(stringmime, MIME"image/svg+xml"(), result))
elseif showable(MIME"text/html"(), result)
Documents.RawHTML(Base.invokelatest(stringmime, MIME"text/html"(), result))
elseif showable(MIME"image/png"(), result)
Documents.RawHTML(string("<img src=\"data:image/png;base64,", Base.invokelatest(stringmime, MIME"image/png"(), result), "\" />"))
elseif showable(MIME"image/webp"(), result)
Expand Down

0 comments on commit 70a4117

Please sign in to comment.