Skip to content
Open
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: 2 additions & 0 deletions src/crayon.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ function _have_color()
end
end
function Base.print(io::IO, x::Crayon)
get(io, :color, true) || return
if anyactive(x) && (_have_color() || _force_color())
print(io, CSI)
if (x.fg.style == COLORS_24BIT || x.bg.style == COLORS_24BIT)
Expand All @@ -122,6 +123,7 @@ function Base.print(io::IO, x::Crayon)
end

function Base.show(io::IO, x::Crayon)
get(io, :color, true) || return
if anyactive(x)
print(io, x)
print(io, ESCAPED_CSI)
Expand Down