actually fix indentation
This commit is contained in:
parent
a4bf3f616a
commit
4ae0d05b47
@ -308,19 +308,20 @@ function puke(item, indent, seen, hidekey)
|
||||
for _=1,indent do
|
||||
pfx ..= " "
|
||||
end
|
||||
local xpfx = pfx.." "
|
||||
|
||||
if item.is_linked_list then
|
||||
local ret,n,xpfx = "linked_list <",0,pfx.." "
|
||||
local ret,n = "linked_list <",0
|
||||
item:strip(function(x)
|
||||
n += 1
|
||||
ret ..= xpfx..tostr(n)..": "..puke(x, indent+1, seen, "next")
|
||||
ret ..= xpfx..tostr(n)..": "..puke(x, indent+2, seen, "next")
|
||||
end)
|
||||
return ret..pfx..">"
|
||||
end
|
||||
|
||||
local ret = "{"
|
||||
for k, v in pairs(item) do
|
||||
if (k ~= hidekey) ret ..= pfx..tostr(k)..": "..puke(v, indent+1, seen)
|
||||
if (k ~= hidekey) ret ..= xpfx..tostr(k)..": "..puke(v, indent+2, seen)
|
||||
end
|
||||
return ret..pfx.."}"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user