Skip to content

Commit

Permalink
Merge pull request #183 from JuliaLang/textmime
Browse files Browse the repository at this point in the history
add istext -> istextmime
  • Loading branch information
stevengj committed Apr 14, 2016
2 parents 16733dc + 84586ca commit e71e7f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ Currently, the `@compat` macro supports the following syntaxes:

* `issym` is now `issymmetric` [#15192](https://github.com/JuliaLang/julia/pull/15192)

* `istext` is now `istextmime` [#15708](https://github.com/JuliaLang/julia/pull/15708)

## New macros

* `@inline` and `@noinline` have been added. On 0.3, these are "no-ops," meaning they don't actually do anything.
Expand Down
5 changes: 5 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -972,4 +972,9 @@ if VERSION < v"0.5.0-dev+977"
foreach(f, itrs...) = (for z in zip(itrs...); f(z...); end; nothing)
end

if !isdefined(Base, :istextmime)
export istextmime
istextmime(m::@compat(Union{MIME,AbstractString})) = istext(m)
end

end # module
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,8 @@ let
@test a == [(2,10),(4,20),(6,30)]
end

@test istextmime("text/html") && !istextmime("image/png")

module CallTest

using Base.Test, Compat
Expand Down

0 comments on commit e71e7f2

Please sign in to comment.