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/node-dir.lua | |
parent | 8d30ee280d6fb2db6268bf6f839c5f93193a6925 (diff) | |
download | context-7ecbcaaf68d152851591dbb5931a6eb15d155019.tar.gz |
2019-11-25 17:37:00
Diffstat (limited to 'tex/context/base/mkiv/node-dir.lua')
-rw-r--r-- | tex/context/base/mkiv/node-dir.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/node-dir.lua b/tex/context/base/mkiv/node-dir.lua index 3f0cba67e..abfd4a8c7 100644 --- a/tex/context/base/mkiv/node-dir.lua +++ b/tex/context/base/mkiv/node-dir.lua @@ -31,13 +31,18 @@ local dirvalues = nodes.dirvalues local lefttoright = dirvalues.lefttoright local righttoleft = dirvalues.righttoleft -local localparnewgraf_code = 0 +local localparcodes = nodes.localparcodes +local hmodepar_code = localparcodes.vmode_par +local vmodepar_code = localparcodes.hmode_par -local function newstack(head,direction) +function nodes.dirstack(head,direction) local stack = { } local top = 0 - if head and getid(head) == localpar_code and getsubtype(head) == localparnewgraf_code then - direction = getdirection(head) + if head and getid(head) == localpar_code then + local s = getsubtype(head) + if s == hmodepar_code or s == vmodepar_code then + direction = getdirection(head) + end end if not direction then direction = lefttoright |