Skip to content

Commit

Permalink
Fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
femtocleaner[bot] committed Aug 11, 2017
1 parent 2b8a2bd commit ef17d02
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/abstractdataframe/io.jl
Expand Up @@ -8,14 +8,8 @@ function escapedprint(io::IO, x::Any, escapes::AbstractString)
print(io, x)
end

if VERSION < v"0.5.0-dev+4354"
function escapedprint(io::IO, x::AbstractString, escapes::AbstractString)
print_escaped(io, x, escapes)
end
else
function escapedprint(io::IO, x::AbstractString, escapes::AbstractString)
escape_string(io, x, escapes)
end
function escapedprint(io::IO, x::AbstractString, escapes::AbstractString)
escape_string(io, x, escapes)
end

function printtable(io::IO,
Expand Down Expand Up @@ -168,7 +162,7 @@ function html_escape(cell::AbstractString)
return cell
end

@compat function Base.show(io::IO, ::MIME"text/html", df::AbstractDataFrame)
function Base.show(io::IO, ::MIME"text/html", df::AbstractDataFrame)
n = size(df, 1)
cnames = _names(df)
write(io, "<table class=\"data-frame\">")
Expand Down Expand Up @@ -210,10 +204,10 @@ end
#
##############################################################################

@compat function Base.show(io::IO, ::MIME"text/csv", df::AbstractDataFrame)
function Base.show(io::IO, ::MIME"text/csv", df::AbstractDataFrame)
printtable(io, df, true, ',')
end

@compat function Base.show(io::IO, ::MIME"text/tab-separated-values", df::AbstractDataFrame)
function Base.show(io::IO, ::MIME"text/tab-separated-values", df::AbstractDataFrame)
printtable(io, df, true, '\t')
end

0 comments on commit ef17d02

Please sign in to comment.