diff --git a/src/fmtspec.jl b/src/fmtspec.jl index b6e1673..ba32b4c 100644 --- a/src/fmtspec.jl +++ b/src/fmtspec.jl @@ -195,7 +195,7 @@ function printfmt(io::IO, fs::FormatSpec, x) end end -printfmt(fs::FormatSpec, x) = printfmt(STDOUT, fs, x) +printfmt(fs::FormatSpec, x) = printfmt(stdout, fs, x) fmt(fs::FormatSpec, x) = sprint(printfmt, fs, x) fmt(spec::AbstractString, x) = fmt(FormatSpec(spec), x) diff --git a/src/formatexpr.jl b/src/formatexpr.jl index 9827459..bf7d80a 100644 --- a/src/formatexpr.jl +++ b/src/formatexpr.jl @@ -157,10 +157,10 @@ function printfmt(io::IO, fe::FormatExpr, args...) end printfmt(io::IO, fe::AbstractString, args...) = printfmt(io, FormatExpr(fe), args...) -printfmt(fe::Union{AbstractString,FormatExpr}, args...) = printfmt(STDOUT, fe, args...) +printfmt(fe::Union{AbstractString,FormatExpr}, args...) = printfmt(stdout, fe, args...) printfmtln(io::IO, fe::Union{AbstractString,FormatExpr}, args...) = (printfmt(io, fe, args...); println(io)) -printfmtln(fe::Union{AbstractString,FormatExpr}, args...) = printfmtln(STDOUT, fe, args...) +printfmtln(fe::Union{AbstractString,FormatExpr}, args...) = printfmtln(stdout, fe, args...) format(fe::Union{AbstractString,FormatExpr}, args...) = sprint(printfmt, fe, args...)