33module Multimedia
44
55export Display, display, pushdisplay, popdisplay, displayable, redisplay,
6- MIME, @MIME , @MIME_str , writemime, reprmime, stringmime, istext ,
6+ MIME, @MIME , @MIME_str , writemime, reprmime, stringmime, istextmime ,
77 mimewritable, TextDisplay
88
99# ##########################################################################
@@ -45,7 +45,7 @@ mimewritable(m::AbstractString, x) = mimewritable(MIME(m), x)
4545
4646# ##########################################################################
4747# MIME types are assumed to be binary data except for a set of types known
48- # to be text data (possibly Unicode). istext (m) returns whether
48+ # to be text data (possibly Unicode). istextmime (m) returns whether
4949# m::MIME is text data, and reprmime(m, x) returns x written to either
5050# a string (for text m::MIME) or a Vector{UInt8} (for binary m::MIME),
5151# assuming the corresponding write_mime method exists. stringmime
@@ -65,7 +65,7 @@ macro textmime(mime)
6565 Base. Multimedia. reprmime (m:: mimeT , x:: Vector{UInt8} ) = sprint (writemime, m, x)
6666 Base. Multimedia. stringmime (m:: mimeT , x:: Vector{UInt8} ) = reprmime (m, x)
6767
68- Base. Multimedia. istext (:: mimeT ) = true
68+ Base. Multimedia. istextmime (:: mimeT ) = true
6969 if $ (mime != " text/plain" ) # strings are shown escaped for text/plain
7070 Base. Multimedia. reprmime (m:: mimeT , x:: AbstractString ) = x
7171 end
@@ -74,7 +74,7 @@ macro textmime(mime)
7474 end
7575end
7676
77- istext (:: MIME ) = false
77+ istextmime (:: MIME ) = false
7878function reprmime (m:: MIME , x)
7979 s = IOBuffer ()
8080 writemime (s, m, x)
@@ -85,7 +85,7 @@ stringmime(m::MIME, x) = base64encode(writemime, m, x)
8585stringmime (m:: MIME , x:: Vector{UInt8} ) = base64encode (write, x)
8686
8787# it is convenient to accept strings instead of ::MIME
88- istext (m:: AbstractString ) = istext (MIME (m))
88+ istextmime (m:: AbstractString ) = istextmime (MIME (m))
8989reprmime (m:: AbstractString , x) = reprmime (MIME (m), x)
9090stringmime (m:: AbstractString , x) = stringmime (MIME (m), x)
9191
0 commit comments