summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/typo-bld.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-05-12 19:57:39 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-05-12 19:57:39 +0200
commit5f6a7c6790baa7e524de5b5bf71a29ea757378f6 (patch)
treed26bcd9e722c4f2c1dfe8f375669d5c0b3fc4972 /tex/context/base/mkiv/typo-bld.lua
parentc49d2942bae7074f3bd4c04b6ee895cee1697ca3 (diff)
downloadcontext-5f6a7c6790baa7e524de5b5bf71a29ea757378f6.tar.gz
2019-05-12 19:16:00
Diffstat (limited to 'tex/context/base/mkiv/typo-bld.lua')
-rw-r--r--tex/context/base/mkiv/typo-bld.lua15
1 files changed, 12 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/typo-bld.lua b/tex/context/base/mkiv/typo-bld.lua
index 55d74281f..d6a4fd9fd 100644
--- a/tex/context/base/mkiv/typo-bld.lua
+++ b/tex/context/base/mkiv/typo-bld.lua
@@ -43,7 +43,12 @@ local new_baselineskip = nodepool.baselineskip
local new_lineskip = nodepool.lineskip
local insert_node_before = nodes.insert_before
local hpack_node = nodes.hpack
-local count_nodes = nodes.countall
+
+local nuts = nodes.nuts
+local tonode = nodes.tonode
+local tonut = nodes.tonut
+local count_nodes = nuts.countall
+local getattr = nuts.getattr
local starttiming = statistics.starttiming
local stoptiming = statistics.stoptiming
@@ -114,7 +119,7 @@ function constructors.handler(head,followed_by_display)
if type(head) == "boolean" then
return head
else
- local attribute = head[a_parbuilder] -- or mainconstructor
+ local attribute = getattr(head,a_parbuilder) -- or mainconstructor
if attribute then
local method = names[attribute]
if method then
@@ -167,7 +172,9 @@ local function processor(head,followed_by_display)
-- todo: not again in otr so we need to flag
if enabled then
starttiming(parbuilders)
- local head = actions(head,followed_by_display)
+ head = tonut(head)
+ head = actions(head,followed_by_display)
+ head = tonode(head)
stoptiming(parbuilders)
return head
else
@@ -195,6 +202,7 @@ function builders.vpack_filter(head,groupcode,size,packtype,maxdepth,direction)
local done = false
if head then
starttiming(builders)
+ head = tonut(head)
if trace_vbox_builder then
local before = count_nodes(head)
head, done = vboxactions(head,groupcode,size,packtype,maxdepth,direction)
@@ -203,6 +211,7 @@ function builders.vpack_filter(head,groupcode,size,packtype,maxdepth,direction)
else
head, done = vboxactions(head,groupcode)
end
+ head = tonode(head)
stoptiming(builders)
end
return head, done