<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,5 @@
 
-local TABLEDEPTH = 5
+local TABLEITEMS, TABLEDEPTH = 5, 1
 local tostring, TableToString = tostring
 
 local panel = LibStub(&quot;tekPanel-Auction&quot;).new(&quot;SpewPanel&quot;, &quot;Spew&quot;)
@@ -36,28 +36,31 @@ end
 local colors = {boolean = &quot;|cffff9100&quot;, number = &quot;|cffff7fff&quot;, [&quot;nil&quot;] = &quot;|cffff7f7f&quot;}
 local noescape = {[&quot;\a&quot;] = &quot;a&quot;, [&quot;\b&quot;] = &quot;b&quot;, [&quot;\f&quot;] = &quot;f&quot;, [&quot;\n&quot;] = &quot;n&quot;, [&quot;\r&quot;] = &quot;r&quot;, [&quot;\t&quot;] = &quot;t&quot;, [&quot;\v&quot;] = &quot;v&quot;}
 local function escape(c) return &quot;\\&quot;.. (noescape[c] or c:byte()) end
-local function pretty_tostring(value)
+local function pretty_tostring(value, depth)
+	depth = depth or 0
 	local t = type(value)
 	if t == &quot;string&quot; then return '|cff00ff00&quot;'..value:gsub(&quot;|&quot;, &quot;||&quot;):gsub(&quot;([\001-\031\128-\255])&quot;, escape)..'&quot;|r'
 	elseif t == &quot;table&quot; then
-		if type(rawget(value, 0)) == &quot;userdata&quot; and type(value.GetObjectType) == &quot;function&quot; then return &quot;|cffffea00&lt;&quot;..value:GetObjectType()..&quot;:&quot;..(value:GetName() or &quot;(anon)&quot;)..&quot;&gt;|r&quot;
-		else return &quot;|cff9f9f9f&quot;..string.join(&quot;, &quot;, TableToString(value))..&quot;|r&quot; end
+		if depth &gt; TABLEDEPTH then return &quot;|cff9f9f9f{...}|r&quot;
+		elseif type(rawget(value, 0)) == &quot;userdata&quot; and type(value.GetObjectType) == &quot;function&quot; then return &quot;|cffffea00&lt;&quot;..value:GetObjectType()..&quot;:&quot;..(value:GetName() or &quot;(anon)&quot;)..&quot;&gt;|r&quot;
+		else return &quot;|cff9f9f9f&quot;..string.join(&quot;, &quot;, TableToString(value, nil, nil, depth+1))..&quot;|r&quot; end
 	elseif colors[t] then return colors[t]..tostring(value)..&quot;|r&quot;
 	else return tostring(value) end
 end
 
 
-function TableToString(t, lasti, depth)
+function TableToString(t, lasti, items, depth)
+	items = items or 0
 	depth = depth or 0
-	if depth &gt; TABLEDEPTH then return &quot;...|cff9f9f9f}|r&quot; end
+	if items &gt; TABLEITEMS then return &quot;...|cff9f9f9f}|r&quot; end
 	local i,v = next(t, lasti)
-	if depth == 0 then
-		if next(t, i) then return &quot;|cff9f9f9f{|cff7fd5ff&quot;..tostring(i)..&quot;|r = &quot;..pretty_tostring(v), TableToString(t, i, depth+1)
+	if items == 0 then
+		if next(t, i) then return &quot;|cff9f9f9f{|cff7fd5ff&quot;..tostring(i)..&quot;|r = &quot;..pretty_tostring(v, depth), TableToString(t, i, 1, depth)
 		elseif v == nil then return &quot;|cff9f9f9f{}|r&quot;
-		else return &quot;|cff9f9f9f{|cff7fd5ff&quot;..tostring(i)..&quot;|r = &quot;..pretty_tostring(v)..&quot;|cff9f9f9f}|r&quot; end
+		else return &quot;|cff9f9f9f{|cff7fd5ff&quot;..tostring(i)..&quot;|r = &quot;..pretty_tostring(v, depth)..&quot;|cff9f9f9f}|r&quot; end
 	end
-	if next(t, i) then return &quot;|cff7fd5ff&quot;..tostring(i)..&quot;|r = &quot;..pretty_tostring(v), TableToString(t, i, depth+1) end
-	return &quot;|cff7fd5ff&quot;..tostring(i)..&quot;|r = &quot;..pretty_tostring(v)..&quot;|cff9f9f9f}|r&quot;
+	if next(t, i) then return &quot;|cff7fd5ff&quot;..tostring(i)..&quot;|r = &quot;..pretty_tostring(v, depth), TableToString(t, i, items+1, depth) end
+	return &quot;|cff7fd5ff&quot;..tostring(i)..&quot;|r = &quot;..pretty_tostring(v, depth)..&quot;|cff9f9f9f}|r&quot;
 end
 
 
@@ -96,7 +99,7 @@ function Spew(input, a1, ...)
 				local sorttable = {}
 				for i in pairs(a1) do table.insert(sorttable, i) end
 				table.sort(sorttable, downcasesort)
-				for _,i in ipairs(sorttable) do Print(&quot;    |cff7fd5ff&quot;..tostring(i)..&quot;|r = &quot;..pretty_tostring(a1[i])) end
+				for _,i in ipairs(sorttable) do Print(&quot;    |cff7fd5ff&quot;..tostring(i)..&quot;|r = &quot;..pretty_tostring(a1[i], 1)) end
 				Print(&quot;|cff9f9f9f}  -- &quot;..input..&quot;|r&quot;)
 				ShowUIPanel(panel)
 			end</diff>
      <filename>Spew.lua</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b4c8cfc8447dc77283b8d9b123fb6af21f8567c5</id>
    </parent>
  </parents>
  <author>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </author>
  <url>http://github.com/tekkub/spew/commit/7ce9210994360502a698eb42f3a65976301b9fb0</url>
  <id>7ce9210994360502a698eb42f3a65976301b9fb0</id>
  <committed-date>2008-11-10T18:53:34-08:00</committed-date>
  <authored-date>2008-11-10T18:53:34-08:00</authored-date>
  <message>Don't recurse too deeply into tables</message>
  <tree>7f238700eae481fa4007aec0ead35798e241b0e1</tree>
  <committer>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </committer>
</commit>
