diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-02-23 18:12:36 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-02-23 18:12:36 +0100 |
commit | c91d92093b72a73a92c3ae3c641137abe6fb64b9 (patch) | |
tree | bfbdc4359ae391d0d96e577fb544023464427e81 /tex/context/base/mkiv/publ-ini.lua | |
parent | e4223677ac0d23e4888e41efda0d2e6aabbe76bf (diff) | |
download | context-c91d92093b72a73a92c3ae3c641137abe6fb64b9.tar.gz |
2017-02-23 17:13:00
Diffstat (limited to 'tex/context/base/mkiv/publ-ini.lua')
-rw-r--r-- | tex/context/base/mkiv/publ-ini.lua | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/publ-ini.lua b/tex/context/base/mkiv/publ-ini.lua index 86dc6cea2..52642c89d 100644 --- a/tex/context/base/mkiv/publ-ini.lua +++ b/tex/context/base/mkiv/publ-ini.lua @@ -1984,6 +1984,33 @@ do arguments = { "string", "string" } } + local function identical(a,b) + local na, nb = #a, #b + if na ~= nb then + return false + end + if na > 0 then + for i=1,na do + if not identical(a[i],b[i]) then + return false + end + end + return true + end + local ha, hb = a.hash, b.hash + if ha then + return ha == hb + end + for k, v in next, a do + if k == "original" or k == "snippets" then + -- skip diagnostic info + elseif v ~= b[k] then + return false + end + end + return true + end + function lists.sameasprevious(dataset,i,name,order,method) local rendering = renderings[dataset] local list = rendering.list @@ -2030,7 +2057,7 @@ do if c_casted and c_casted == p_casted then sameentry = true elseif type(c_casted) == "table" and type(p_casted) == "table" then - sameentry = table.identical(c_casted,p_casted) + sameentry = identical(c_casted,p_casted) end end if trace_detail then |