diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-07-06 22:50:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-07-06 22:50:00 +0200 |
commit | 73b0f4f97a684af38d4aa3bfd4829939ad47c7c7 (patch) | |
tree | ac5b5ddb99c69592da73cb5618af6c3832cd99b7 /tex/generic | |
parent | db237f90e36d8862262f16f579eb98c1948faa03 (diff) | |
download | context-73b0f4f97a684af38d4aa3bfd4829939ad47c7c7.tar.gz |
beta 2014.07.06 22:50
Diffstat (limited to 'tex/generic')
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 52a65ea57..2f26be70e 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/04/14 15:55:31 +-- merge date : 07/06/14 22:50:12 do -- begin closure to overcome local limits and interference @@ -665,17 +665,34 @@ end function lpeg.utfchartabletopattern(list) local tree={} local hash={} - for i=1,#list do - local t=tree - for c in gmatch(list[i],".") do - local tc=t[c] - if not tc then - tc={} - t[c]=tc + local n=#list + if n==0 then + for s in next,list do + local t=tree + for c in gmatch(s,".") do + local tc=t[c] + if not tc then + tc={} + t[c]=tc + end + t=tc + end + hash[t]=s + end + else + for i=1,n do + local t=tree + local s=list[i] + for c in gmatch(s,".") do + local tc=t[c] + if not tc then + tc={} + t[c]=tc + end + t=tc end - t=tc + hash[t]=s end - hash[t]=list[i] end return make(tree,hash) end |