diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-07-24 13:08:53 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-07-24 13:08:53 +0200 |
commit | 47852e5715e7c0374bb6bc173c1728908549e1ed (patch) | |
tree | e6df8c61ffb0aadfabbca7e9a33f10d1b61bde68 /tex/context/base/mkiv/l-table.lua | |
parent | a92a8d40ce567ecf5b0baacd9a93a94aac9a4a2d (diff) | |
download | context-47852e5715e7c0374bb6bc173c1728908549e1ed.tar.gz |
2019-07-24 11:24:00
Diffstat (limited to 'tex/context/base/mkiv/l-table.lua')
-rw-r--r-- | tex/context/base/mkiv/l-table.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/l-table.lua b/tex/context/base/mkiv/l-table.lua index 192347b06..cffdcc23e 100644 --- a/tex/context/base/mkiv/l-table.lua +++ b/tex/context/base/mkiv/l-table.lua @@ -1261,10 +1261,12 @@ function table.reverse(t) -- check with 5.3 ? end end +-- This one is for really simple cases where need a hash from a table. + local function sequenced(t,sep,simple) if not t then return "" - elseif type(t) == "string" then + elseif type(t) ~= "table" then return t -- handy fallback end local n = #t @@ -1305,7 +1307,11 @@ local function sequenced(t,sep,simple) end end end - return concat(s,sep or " | ") + if sep == true then + return "{ " .. concat(s,", ") .. " }" + else + return concat(s,sep or " | ") + end end table.sequenced = sequenced |