|
|
|
@ -56,16 +56,14 @@ function limitstringmime(mime::MIME, x) |
|
|
|
if israwtext(mime, x) |
|
|
|
if israwtext(mime, x) |
|
|
|
return String(x) |
|
|
|
return String(x) |
|
|
|
else |
|
|
|
else |
|
|
|
# show(IOContext(buf, :limit=>true, :color=>true), mime, x) |
|
|
|
show(IOContext(buf, :limit=>true, :color=>true), mime, x) |
|
|
|
Base.invokelatest(show, IOContext(buf, :limit=>true, :color=>true), mime, x) |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
else |
|
|
|
else |
|
|
|
b64 = Base64EncodePipe(buf) |
|
|
|
b64 = Base64EncodePipe(buf) |
|
|
|
if isa(x, Vector{UInt8}) |
|
|
|
if isa(x, Vector{UInt8}) |
|
|
|
write(b64, x) # x assumed to be raw binary data |
|
|
|
write(b64, x) # x assumed to be raw binary data |
|
|
|
else |
|
|
|
else |
|
|
|
# show(IOContext(b64, :limit=>true, :color=>true), mime, x) |
|
|
|
show(IOContext(b64, :limit=>true, :color=>true), mime, x) |
|
|
|
Base.invokelatest(show, IOContext(b64, :limit=>true, :color=>true), mime, x) |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
close(b64) |
|
|
|
close(b64) |
|
|
|
end |
|
|
|
end |
|
|
|
|