summaryrefslogtreecommitdiff
path: root/tex/context/base/node-fin.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2015-12-17 16:15:07 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2015-12-17 16:15:07 +0100
commitd1faffcd5d92925a6c5e66ebb72b4c8dcfae236f (patch)
treec1663d54da8573c0541015e5a307a28e22215a8b /tex/context/base/node-fin.lua
parentadc43c3c243ed95215af6fe02d71e393c178da23 (diff)
downloadcontext-d1faffcd5d92925a6c5e66ebb72b4c8dcfae236f.tar.gz
2015-12-17 15:59:00
Diffstat (limited to 'tex/context/base/node-fin.lua')
-rw-r--r--tex/context/base/node-fin.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/tex/context/base/node-fin.lua b/tex/context/base/node-fin.lua
index d83dceb9f..c062ddd00 100644
--- a/tex/context/base/node-fin.lua
+++ b/tex/context/base/node-fin.lua
@@ -203,16 +203,22 @@ local function process(namespace,attribute,head,inheritance,default) -- one attr
local outer = getattr(stack,attribute)
if outer ~= inheritance then
local list, ok = process(namespace,attribute,content,inheritance,outer)
+if content ~= list then
setfield(stack,"list",list)
+end
done = done or ok
else
local list, ok = process(namespace,attribute,content,inheritance,default)
+if content ~= list then
setfield(stack,"list",list)
+end
done = done or ok
end
else
local list, ok = process(namespace,attribute,content,inheritance,default)
+if content ~= list then
setfield(stack,"list",list)
+end
done = done or ok
end
-- end nested --
@@ -251,16 +257,22 @@ local function process(namespace,attribute,head,inheritance,default) -- one attr
local outer = getattr(stack,attribute)
if outer ~= inheritance then
local list, ok = process(namespace,attribute,leader,inheritance,outer)
+if leader ~= list then
setfield(stack,"leader",list)
+end
done = done or ok
else
local list, ok = process(namespace,attribute,leader,inheritance,default)
+if leader ~= list then
setfield(stack,"leader",list)
+end
done = done or ok
end
else
local list, ok = process(namespace,attribute,leader,inheritance,default)
+if leader ~= list then
setfield(stack,"leader",list)
+end
done = done or ok
end
-- end nested --
@@ -320,16 +332,22 @@ local function selective(namespace,attribute,head,inheritance,default) -- two at
local outer = getattr(stack,attribute)
if outer ~= inheritance then
local list, ok = selective(namespace,attribute,content,inheritance,outer)
+if content ~= list then
setfield(stack,"list",list)
+end
done = done or ok
else
local list, ok = selective(namespace,attribute,content,inheritance,default)
+if content ~= list then
setfield(stack,"list",list)
+end
done = done or ok
end
else
local list, ok = selective(namespace,attribute,content,inheritance,default)
+if content ~= list then
setfield(stack,"list",list)
+end
done = done or ok
end
-- end nested
@@ -366,16 +384,22 @@ local function selective(namespace,attribute,head,inheritance,default) -- two at
local outer = getatribute(stack,attribute)
if outer ~= inheritance then
local list, ok = selective(namespace,attribute,leader,inheritance,outer)
+if leader ~= list then
setfield(stack,"leader",list)
+end
done = done or ok
else
local list, ok = selective(namespace,attribute,leader,inheritance,default)
+if leader ~= list then
setfield(stack,"leader",list)
+end
done = done or ok
end
else
local list, ok = selective(namespace,attribute,leader,inheritance,default)
+if leader ~= list then
setfield(stack,"leader",list)
+end
done = done or ok
end
-- end nested
@@ -440,18 +464,24 @@ local function stacked(namespace,attribute,head,default) -- no triggering, no in
current = a
head = insert_node_before(head,stack,copied(nsdata[a]))
local list = stacked(namespace,attribute,content,current) -- two return values
+if content ~= list then
setfield(stack,"list",list)
+end
done = true
head, stack = insert_node_after(head,stack,copied(nsnone))
current = p
else
local list, ok = stacked(namespace,attribute,content,current)
+if content ~= list then
setfield(stack,"list",list) -- only if ok
+end
done = done or ok
end
else
local list, ok = stacked(namespace,attribute,content,current)
+if content ~= list then
setfield(stack,"list",list) -- only if ok
+end
done = done or ok
end
end
@@ -471,7 +501,9 @@ local function stacked(namespace,attribute,head,default) -- no triggering, no in
end
if leader then
local list, ok = stacked(namespace,attribute,content,current)
+if leader ~= list then
setfield(stack,"leader",list) -- only if ok
+end
done = done or ok
leader = false
end