diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-11-25 23:15:50 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-11-25 23:15:50 +0100 |
commit | 7ecbcaaf68d152851591dbb5931a6eb15d155019 (patch) | |
tree | 45722ebceab0911372cd571bfc9b2c1ed992e747 /tex/context/base/mkiv/typo-dua.lua | |
parent | 8d30ee280d6fb2db6268bf6f839c5f93193a6925 (diff) | |
download | context-7ecbcaaf68d152851591dbb5931a6eb15d155019.tar.gz |
2019-11-25 17:37:00
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 |