Skip to content
Open
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
1 change: 1 addition & 0 deletions src/PrettyPrinting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import Base:
const DEFAULT_LINE_WIDTH = 79
const DEFAULT_BREAK_COST = 1
const DEFAULT_SPILL_COST = 2
const TAB_SIZE = Ref{Int}(4)

include("tile.jl")
include("fit.jl")
Expand Down
4 changes: 2 additions & 2 deletions src/tile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function list_layout(items::Vector{Layout};
par::Tuple{String,String}=("(", ")"),
sep::String=", ",
sep_brk=:end, # :start, :end, :both, or :none
tab::Int=4,
tab::Int=TAB_SIZE[],
nobrk::Int=10)
!isempty(items) || return literal("$(prefix)$(par[1])$(par[2])")
head_lt = literal("$(prefix)$(par[1])")
Expand All @@ -144,7 +144,7 @@ function pair_layout(fst::Layout,
snd::Layout;
sep::String=" => ",
sep_brk=:end, # :start, :end, :both, or :none
tab::Int=4)
tab::Int=TAB_SIZE[])
sepc_lt = literal(sep)
sepl_lt = literal(sep_brk == :start || sep_brk == :both ? lstrip(sep) : "")
sepr_lt = literal(sep_brk == :end || sep_brk == :both ? rstrip(sep) : "")
Expand Down