diff options
Diffstat (limited to 'tex/context/base/l-table.lua')
-rw-r--r-- | tex/context/base/l-table.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tex/context/base/l-table.lua b/tex/context/base/l-table.lua index ee395d0f1..889d25ac6 100644 --- a/tex/context/base/l-table.lua +++ b/tex/context/base/l-table.lua @@ -605,7 +605,7 @@ local function serialize(root,name,_handle,_reduce,_noquotes,_hexify) handle("t={") end if root and next(root) then - do_serialize(root,name,"",0,indexed) + do_serialize(root,name,"",0) end handle("}") end @@ -908,3 +908,14 @@ function table.insert_after_value(t,value,extra) insert(t,#t+1,extra) end +function table.sequenced(t,sep) + local s = { } + for k, v in next, t do -- indexed? + s[#s+1] = k .. "=" .. tostring(v) + end + return concat(s, sep or " | ") +end + +function table.print(...) + print(table.serialize(...)) +end |