summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/strc-mar.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-05-12 01:19:03 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-05-12 01:19:03 +0200
commit77e216e323271fb85d508b7206b13c980540b74b (patch)
tree5b4053c2bbe5190e28c0dce89653c7b13aea0642 /tex/context/base/mkiv/strc-mar.lua
parentd817aef76ab8b606c02bd0636661b634b43a68a6 (diff)
downloadcontext-77e216e323271fb85d508b7206b13c980540b74b.tar.gz
2018-05-12 00:16:00
Diffstat (limited to 'tex/context/base/mkiv/strc-mar.lua')
-rw-r--r--tex/context/base/mkiv/strc-mar.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/strc-mar.lua b/tex/context/base/mkiv/strc-mar.lua
index a2cbc2ab2..bb79ac7a9 100644
--- a/tex/context/base/mkiv/strc-mar.lua
+++ b/tex/context/base/mkiv/strc-mar.lua
@@ -29,14 +29,17 @@ local getlist = nuts.getlist
local getattr = nuts.getattr
local getbox = nuts.getbox
-local traverse = nuts.traverse
-local traverse_id = nuts.traverse_id
+local nextnode = nuts.traversers.node
local nodecodes = nodes.nodecodes
local glyph_code = nodecodes.glyph
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
+local whatsit_code = nodecodes.whatsit
+local whatsitcodes = nodes.whatsitcodes
+local latelua_code = whatsitcodes.latelua
+
local texsetattribute = tex.setattribute
local a_marks = attributes.private("structure","marks")
@@ -116,8 +119,9 @@ end
-- identify range
local function sweep(head,first,last)
- for n, id in traverse(head) do
- if id == glyph_code then
+ for n, id, subtype in nextnode, head do
+ -- we need to handle empty heads so we test for latelua
+ if id == glyph_code or (id == whatsit_code and subtype == latelua_code) then
local a = getattr(n,a_marks)
if not a then
-- next