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
|
for _=1,indent do
|
||||||
pfx ..= " "
|
pfx ..= " "
|
||||||
end
|
end
|
||||||
|
local xpfx = pfx.." "
|
||||||
|
|
||||||
if item.is_linked_list then
|
if item.is_linked_list then
|
||||||
local ret,n,xpfx = "linked_list <",0,pfx.." "
|
local ret,n = "linked_list <",0
|
||||||
item:strip(function(x)
|
item:strip(function(x)
|
||||||
n += 1
|
n += 1
|
||||||
ret ..= xpfx..tostr(n)..": "..puke(x, indent+1, seen, "next")
|
ret ..= xpfx..tostr(n)..": "..puke(x, indent+2, seen, "next")
|
||||||
end)
|
end)
|
||||||
return ret..pfx..">"
|
return ret..pfx..">"
|
||||||
end
|
end
|
||||||
|
|
||||||
local ret = "{"
|
local ret = "{"
|
||||||
for k, v in pairs(item) do
|
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
|
end
|
||||||
return ret..pfx.."}"
|
return ret..pfx.."}"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user