Skip to content

Commit

Permalink
fix have_color
Browse files Browse the repository at this point in the history
  • Loading branch information
wookay committed Apr 19, 2020
1 parent 0a570e4 commit a458d34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/table.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const rownames_style = Dict(:color=>:cyan,)

# Base.show
function Base.show(io::IO, colored::ColoredString)
if Base.have_color && colored.style isa Dict
if Base.have_color == true && colored.style !== nothing
printstyled(io, colored.data, color=colored.style[:color])
else
print(io, colored.data)
Expand Down Expand Up @@ -51,7 +51,7 @@ function print_plate(io::IO, linear::Linear, tablemode::TableMode, islast::Bool)
end
end
end
if tablemode.style==:markdown && i==height
if tablemode.style === :markdown && i==height
!islast && println(io)
else
println(io)
Expand Down Expand Up @@ -261,7 +261,7 @@ function decking(mill::Mill, tablemode::TableMode)
cols += 1
end

isgridmode = tablemode.style == :grid
isgridmode = tablemode.style === :grid
isgridmode && push!(plates, horizontal(maxwidths, cols, margin, tablemode, dash="-"))
@inbounds for i=1:rows
linear = Linear{Union{Cell,Vertical}}([])
Expand Down

0 comments on commit a458d34

Please sign in to comment.