Skip to content

Commit

Permalink
Merge pull request #60 from bauglir/reenable-automatic-jpeg-rendering
Browse files Browse the repository at this point in the history
Re-enable automatic JPEG rendering through `Base.show`
  • Loading branch information
bauglir authored Apr 23, 2024
2 parents bb4a051 + 131f93f commit 35c3f55
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/Kroki.jl
Original file line number Diff line number Diff line change
Expand Up @@ -378,16 +378,6 @@ Base.showable(::MIME"image/svg+xml", ::Diagram) = true
Base.showable(::T, diagram::Diagram) where {T <: MIME} =
Symbol(lowercase(String(diagram.type))) get(LIMITED_DIAGRAM_SUPPORT, T(), Tuple([]))

# Calling `Base.show` for JPEGs is explicitly disabled, for the time being.
# JPEG rendering is broken for all, supposedly supported, diagram types in the
# Kroki service. Should the support be fixed in the service, this method can be
# easily redefined by consuming software to support JPEG in case Kroki.jl has
# not been updated and released.
#
# Note that this only affects automatic rendering of `Diagram`s to JPEGs in
# supported environments. It is still possible to use `render` to render JPEGs
Base.showable(::MIME"image/jpeg", ::Diagram) = false

"""
Defines the MIME type to be used when `show` gets called on a [`Diagram`](@ref)
for the `text/plain` MIME type.
Expand Down

0 comments on commit 35c3f55

Please sign in to comment.