From 7b271baae19db1528fbe6621bdf50af89a5a336b Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 22 Feb 2019 20:29:46 +0100 Subject: 2019-02-22 19:43:00 --- tex/context/base/mkiv/typo-dir.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'tex/context/base/mkiv/typo-dir.lua') diff --git a/tex/context/base/mkiv/typo-dir.lua b/tex/context/base/mkiv/typo-dir.lua index 7fbf5f6d3..88c84bd02 100644 --- a/tex/context/base/mkiv/typo-dir.lua +++ b/tex/context/base/mkiv/typo-dir.lua @@ -45,8 +45,9 @@ local band = bit32.band local texsetattribute = tex.setattribute local unsetvalue = attributes.unsetvalue -local getnext = nodes.getnext -local getattr = nodes.getattr +local nuts = nodes.nuts +local getnext = nuts.getnext +local getattr = nuts.getattr local enableaction = nodes.tasks.enableaction local tracers = nodes.tracers @@ -165,24 +166,24 @@ local stoptiming = statistics.stoptiming -- -- \enabledirectives[typesetters.directions.onetoo] -function directions.handler(head,_,_,_,direction) +function directions.handler(head,where,_,_,direction) local only_one = not getnext(head) if only_one and not one_too then - return head, false + return head end local attr = getattr(head,a_directions) if not attr or attr == 0 then - return head, false + return head end local method = getmethod(attr) local handler = handlers[method] if not handler then - return head, false + return head end starttiming(directions) - local head, done = handler(head,direction,only_one) + head = handler(head,direction,only_one,where) stoptiming(directions) - return head, done + return head end statistics.register("text directions", function() -- cgit v1.2.3