diff --git a/REQUIRE b/REQUIRE index c5a584c..d8e2829 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1 +1 @@ -julia 0.7-beta +julia 0.7-beta2 diff --git a/src/TreeViews.jl b/src/TreeViews.jl index 87cac09..8cf7f76 100644 --- a/src/TreeViews.jl +++ b/src/TreeViews.jl @@ -22,6 +22,8 @@ numberofnodes(x::T) where {T} = fieldcount(T) treelabel(io::IO, x, mime = MIME"text/plain"()) Prints `x`'s tree header to `io`. +Like with `Base.show` there are also methods with `mime::AbstractString` and no `mime` argument at all (which +falls back to `MIME"text/plain"()`). Please only overload the `treelabel(io::IO, x, mime::MIME)` form. """ treelabel(io::IO, x::T, mime::MIME"text/plain") where {T} = show(io, mime, T) treelabel(io::IO, x::T, mime::AbstractString) where {T} = treelabel(io, x, MIME(mime)) @@ -31,6 +33,8 @@ treelabel(io::IO, x::T) where {T} = treelabel(io, x, MIME"text/plain"()) nodelabel(io::IO, x::T, i::Integer, mime::MIME"text/plain" = MIME"text/plain"()) Prints the label of `x`'s `i`-th child to `io`. +Like with `Base.show` there are also methods with `mime::AbstractString` and no `mime` argument at all (which +falls back to `MIME"text/plain"()`). Please only overload the `nodelabel(io::IO, x, i::Integer, mime::MIME)` form. """ function nodelabel(io::IO, x::T, i::Integer, mime::MIME"text/plain") where {T} show(io, mime, Text(String(fieldname(T, i))))