@@ -96,9 +96,10 @@ struct TreeCharSet
9696 trunc
9797end
9898
99- # Default charset
100- TreeCharSet () = TreeCharSet (' ├' ,' └' ,' │' ,' ─' ,' ⋮' )
101- TreeCharSet (mid, term, skip, dash) = TreeCharSet (mid, term, skip, dash, ' ⋮' )
99+ """ Default `charset` argument used by [`print_tree`](@ref)."""
100+ const DEFAULT_CHARSET = TreeCharSet (' ├' , ' └' , ' │' , ' ─' , ' ⋮' )
101+ """ Charset using only ASCII characters."""
102+ const ASCII_CHARSET = TreeCharSet (" +" , " \\ " , " |" , " --" , " ..." )
102103
103104
104105"""
@@ -116,7 +117,7 @@ function print_prefix(io::IO, depth::Int, charset::TreeCharSet, active_levels)
116117end
117118
118119function _print_tree (printnode:: Function , io:: IO , tree; maxdepth = 5 , indicate_truncation = true ,
119- depth = 0 , active_levels = Int[], charset = TreeCharSet () , withinds = false ,
120+ depth = 0 , active_levels = Int[], charset = DEFAULT_CHARSET , withinds = false ,
120121 inds = [], from = nothing , to = nothing , roottree = tree)
121122 nodebuf = IOBuffer ()
122123 isa (io, IOContext) && (nodebuf = IOContext (nodebuf, io))
0 commit comments