From 2bb698d1334bb401d0babd9281d5c1541aeffcb9 Mon Sep 17 00:00:00 2001 From: Roger-luo Date: Wed, 1 Feb 2023 01:25:38 -0500 Subject: [PATCH] fix print_child_key with color --- src/printing.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/printing.jl b/src/printing.jl index d96751b..35d7852 100644 --- a/src/printing.jl +++ b/src/printing.jl @@ -258,11 +258,11 @@ function print_tree(printnode::Function, print_child_key::Function, io::IO, node # Print key if this_printkeys - print_child_key(IOContext(buf, io), child_key) - key_str = String(take!(buf)) - - print(io, key_str, charset.pair) + print_child_key(io, child_key) + print(io, charset.pair) + print_child_key(IOContext(IOContext(buf, io), :color=>false), child_key) + key_str = String(take!(buf)) child_prefix *= " " ^ (textwidth(key_str) + textwidth(charset.pair)) end