Fix nested trees deeper than 2 not being indented

This commit is contained in:
Talia 2018-07-17 10:44:25 +02:00
parent b817b4be7b
commit 9d50868efa

View file

@ -9,7 +9,7 @@ tree = (tab, pref='') ->
io.write last and "└─" or "├─" io.write last and "└─" or "├─"
switch type element switch type element
when "table" when "table"
tree element, last and ' ' or '│ ' tree element, pref .. (last and ' ' or '│ ')
else else
print tostring element print tostring element