Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

STDOUT -> stdout (Fix #69) #70

Merged
merged 1 commit into from
Sep 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fmtspec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions src/formatexpr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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...)