diff options
Diffstat (limited to 'tex/context/base/mkiv/typo-dua.lua')
-rw-r--r-- | tex/context/base/mkiv/typo-dua.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/typo-dua.lua b/tex/context/base/mkiv/typo-dua.lua index 3db5f510a..0cec0e08e 100644 --- a/tex/context/base/mkiv/typo-dua.lua +++ b/tex/context/base/mkiv/typo-dua.lua @@ -85,6 +85,7 @@ local setdirection = nuts.setdirection 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 @@ -336,7 +337,7 @@ local function get_baselevel(head,list,size,direction) -- This is an adapted version: 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 @@ -774,7 +775,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 local d = new_direction(begindir) -- setprop(d,"directions",true) @@ -816,7 +817,7 @@ local function apply_to_list(list,size,head,pardir) end local function process(head,direction,only_one,where) - -- This is an adapted version: + -- This is an adapted version: local list, size = build_list(head) local baselevel, dirfound = get_baselevel(head,list,size,direction) if not dirfound and trace_details then |