Skip to content

Commit

Permalink
add istext -> istextmime
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Apr 14, 2016
1 parent 16733dc commit 67e9328
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 VERSION < v"0.5.0-dev+10878"
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 67e9328

Please sign in to comment.