summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2019-02-24 15:12:57 +0000
committerNorbert Preining <preining@logic.at>2019-02-24 15:12:57 +0000
commit1314fbe93790c501dc436a5cf99f106b9e5c0f63 (patch)
tree04dc7734c8be8ffe385d41f4388826ef5857b6f9 /Master/texmf-dist/tex/context/base/mkiv/node-scn.lua
parenteb80ce7b34f59896a1dfee5ca422495394d6677f (diff)
Revert "ConTeXt version 2019.02.22 19:35"
This reverts commit 5c6357cdb820b4f628d036ba7b2248f221d50c0b. git-svn-id: svn://tug.org/texlive/trunk@50112 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/node-scn.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-scn.lua31
1 files changed, 22 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua b/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua
index a40a5271a9e..b294b30131d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua
@@ -12,6 +12,8 @@ local attributes = attributes
local nodes = nodes
local nuts = nodes.nuts
+local tonode = nuts.tonode
+local tonut = nuts.tonut
local getnext = nuts.getnext
local getprev = nuts.getprev
@@ -24,8 +26,9 @@ local setlist = nuts.setlist
local end_of_math = nuts.end_of_math
local nodecodes = nodes.nodecodes
-local leadercodes = nodes.leadercodes
+local rulecodes = nodes.rulecodes
local gluecodes = nodes.gluecodes
+local listcodes = nodes.listcodes
local kerncodes = nodes.kerncodes
local glyph_code = nodecodes.glyph
@@ -43,8 +46,7 @@ local vlist_code = nodecodes.vlist
local userskip_code = gluecodes.userskip
local spaceskip_code = gluecodes.spaceskip
local xspaceskip_code = gluecodes.xspaceskip
-
-local leaders_code = leadercodes.leaders
+local leader_code = gluecodes.leaders
local fontkern_code = kerncodes.fontkern
@@ -95,7 +97,7 @@ local function striprange(first,last) -- todo: dir
return first, last
end
-nuts.striprange = striprange
+nodes.striprange = striprange
-- todo: order and maybe other dimensions
@@ -203,7 +205,7 @@ local function processwords(attribute,data,flush,head,parent,skip) -- we have hl
elseif id == glue_code then
-- catch \underbar{a} \underbar{a} (subtype test is needed)
local subtype = getsubtype(n)
- if getattr(n,attribute) and (subtype == userskip_code or subtype == spaceskip_code or subtype == xspaceskip_code or (leaders and subtype >= leaders_code)) then
+ if getattr(n,attribute) and (subtype == userskip_code or subtype == spaceskip_code or subtype == xspaceskip_code or (leaders and subtype >= leader_code)) then
l = n
else
head, done = flush(head,f,l,d,level,parent,strip), true
@@ -226,11 +228,17 @@ local function processwords(attribute,data,flush,head,parent,skip) -- we have hl
end
end
-nuts.processwords = function(attribute,data,flush,head,parent) -- we have hlistdir and local dir
- return processwords(attribute,data,flush,head,parent)
+nodes.processwords = function(attribute,data,flush,head,parent) -- we have hlistdir and local dir
+ head = tonut(head)
+ if parent then
+ parent = tonut(parent)
+ end
+ local head, done = processwords(attribute,data,flush,head,parent)
+ return tonode(head), done
end
-- works on lines !
+
-- todo: stack because skip can change when nested
local function processranges(attribute,flush,head,parent,depth,skip)
@@ -311,6 +319,11 @@ local function processranges(attribute,flush,head,parent,depth,skip)
end
end
-nuts.processranges = function(attribute,flush,head,parent) -- we have hlistdir and local dir
- return processranges(attribute,flush,head,parent,0)
+nodes.processranges = function(attribute,flush,head,parent) -- we have hlistdir and local dir
+ head = tonut(head)
+ if parent then
+ parent = tonut(parent)
+ end
+ local head, done = processranges(attribute,flush,head,parent,0)
+ return tonode(head), done
end