Skip to content

Commit c8f9bff

Browse files
authored
Prefer to show AbstractStrings with text mimes (#1114)
`israwtext` assumed that an `AbstractString` with a text MIME was already in the requested format. Instead, only assume this if the string is not otherwise `showable`. This enables customizing the display of `AbstractString`s.
1 parent af0a1f8 commit c8f9bff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/inline.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const ipy_mime = [
2222
# need special handling for showing a string as a textmime
2323
# type, since in that case the string is assumed to be
2424
# raw data unless it is text/plain
25-
israwtext(::MIME, x::AbstractString) = true
25+
israwtext(m::MIME, x::AbstractString) = !showable(m, x)
2626
israwtext(::MIME"text/plain", x::AbstractString) = false
2727
israwtext(::MIME, x) = false
2828

0 commit comments

Comments
 (0)