summaryrefslogtreecommitdiff
path: root/tex/generic
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2014-07-18 13:15:04 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2014-07-18 13:15:04 +0200
commitea87d7b4a5a50dafea3a8b93f529dc3e2af73787 (patch)
tree99d9f8e1a885bd4ef175e7610385fdb9c61878c0 /tex/generic
parent9ee2de8e49ca2d5d9b5068067e1970d7d2993112 (diff)
downloadcontext-ea87d7b4a5a50dafea3a8b93f529dc3e2af73787.tar.gz
2014-07-18 12:16:00
Diffstat (limited to 'tex/generic')
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua23
1 files changed, 17 insertions, 6 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 87e016321..f7825065e 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 07/17/14 13:24:59
+-- merge date : 07/18/14 12:14:41
do -- begin closure to overcome local limits and interference
@@ -1603,14 +1603,25 @@ local function identical(a,b)
end
table.identical=identical
table.are_equal=are_equal
-function table.compact(t)
- if t then
- for k,v in next,t do
- if not next(v) then
- t[k]=nil
+local function sparse(old,nest,keeptables)
+ local new={}
+ for k,v in next,old do
+ if not (v=="" or v==false) then
+ if nest and type(v)=="table" then
+ v=sparse(v,nest)
+ if keeptables or next(v) then
+ new[k]=v
+ end
+ else
+ new[k]=v
end
end
end
+ return new
+end
+table.sparse=sparse
+function table.compact(t)
+ return sparse(t,true,true)
end
function table.contains(t,v)
if t then