summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/l-table.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-04-13 15:51:39 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-04-13 15:51:39 +0200
commit25fcad7435f56cdce2658336909f4da6a65589c0 (patch)
treec23d5d04a7e86c7ddc2ebeca06d3de63ebdc806e /tex/context/base/mkiv/l-table.lua
parent1e5d7f41ddede5e6400a2a7762032823d3545df4 (diff)
downloadcontext-25fcad7435f56cdce2658336909f4da6a65589c0.tar.gz
2018-04-13 15:02:00
Diffstat (limited to 'tex/context/base/mkiv/l-table.lua')
-rw-r--r--tex/context/base/mkiv/l-table.lua16
1 files changed, 13 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/l-table.lua b/tex/context/base/mkiv/l-table.lua
index 5cd65dd67..788d1511f 100644
--- a/tex/context/base/mkiv/l-table.lua
+++ b/tex/context/base/mkiv/l-table.lua
@@ -1236,7 +1236,7 @@ function table.reverse(t) -- check with 5.3 ?
end
end
-function table.sequenced(t,sep,simple) -- hash only
+local function sequenced(t,sep,simple)
if not t then
return ""
end
@@ -1257,17 +1257,27 @@ function table.sequenced(t,sep,simple) -- hash only
s[n] = k
elseif v and v~= "" then
n = n + 1
- s[n] = k .. "=" .. tostring(v)
+ if type(v) == "table" then
+ s[n] = k .. "={" .. sequenced(v,sep,simple) .. "}"
+ else
+ s[n] = k .. "=" .. tostring(v)
+ end
end
else
n = n + 1
- s[n] = k .. "=" .. tostring(v)
+ if type(v) == "table" then
+ s[n] = k .. "={" .. sequenced(v,sep,simple) .. "}"
+ else
+ s[n] = k .. "=" .. tostring(v)
+ end
end
end
end
return concat(s,sep or " | ")
end
+table.sequenced = sequenced
+
function table.print(t,...)
if type(t) ~= "table" then
print(tostring(t))