From 7ecbcaaf68d152851591dbb5931a6eb15d155019 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Mon, 25 Nov 2019 23:15:50 +0100 Subject: 2019-11-25 17:37:00 --- tex/context/base/mkiv/typo-duc.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tex/context/base/mkiv/typo-duc.lua') diff --git a/tex/context/base/mkiv/typo-duc.lua b/tex/context/base/mkiv/typo-duc.lua index f91fc4d64..d4c56e300 100644 --- a/tex/context/base/mkiv/typo-duc.lua +++ b/tex/context/base/mkiv/typo-duc.lua @@ -77,6 +77,7 @@ local properties = nodes.properties.data local remove_node = nuts.remove local insert_node_after = nuts.insert_after local insert_node_before = nuts.insert_before +local start_of_par = nuts.start_of_par local nodepool = nuts.pool local new_direction = nodepool.direction @@ -412,7 +413,7 @@ end local function get_baselevel(head,list,size,direction) if direction == lefttoright_code or direction == righttoleft_code then return direction, true - elseif getid(head) == localpar_code and getsubtype(head) == 0 then + elseif getid(head) == localpar_code and start_of_par(head) then direction = getdirection(head) if direction == lefttoright_code or direction == righttoleft_code then return direction, true @@ -954,7 +955,7 @@ local function apply_to_list(list,size,head,pardir) enddir = false end elseif begindir then - if id == localpar_code and getsubtype(current) == 0 then + if id == localpar_code and start_of_par(current) then -- localpar should always be the 1st node head, current = insert_node_after(head,current,new_direction(begindir)) begindir = nil -- cgit v1.2.3