summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/node-aux.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-11-25 23:15:50 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-11-25 23:15:50 +0100
commit7ecbcaaf68d152851591dbb5931a6eb15d155019 (patch)
tree45722ebceab0911372cd571bfc9b2c1ed992e747 /tex/context/base/mkiv/node-aux.lua
parent8d30ee280d6fb2db6268bf6f839c5f93193a6925 (diff)
downloadcontext-7ecbcaaf68d152851591dbb5931a6eb15d155019.tar.gz
2019-11-25 17:37:00
Diffstat (limited to 'tex/context/base/mkiv/node-aux.lua')
-rw-r--r--tex/context/base/mkiv/node-aux.lua33
1 files changed, 27 insertions, 6 deletions
diff --git a/tex/context/base/mkiv/node-aux.lua b/tex/context/base/mkiv/node-aux.lua
index e116a2cdc..ef884987b 100644
--- a/tex/context/base/mkiv/node-aux.lua
+++ b/tex/context/base/mkiv/node-aux.lua
@@ -473,13 +473,34 @@ end
-- end
-- end
-function nuts.setparproperty(action,...)
- local tail = tonut(texnest[texnest.ptr].tail)
- while tail do
- if getid(tail) == localpar_code then
- return action(tail,...)
- else
+do
+
+ local localparcodes = nodes.localparcodes
+ local hmodepar_code = localparcodes.vmode_par
+ local vmodepar_code = localparcodes.hmode_par
+
+ local getsubtype = nuts.getsubtype
+
+ function nuts.setparproperty(action,...)
+ local tail = tonut(texnest[texnest.ptr].tail)
+ while tail do
+ if getid(tail) == localpar_code then
+ local s = getsubtype(tail)
+ if s == hmodepar_code or s == vmodepar_code then
+ return action(tail,...)
+ else
+ -- something is wrong here
+ end
+ end
tail = getprev(tail)
end
end
+
+ local getsubtype = nodes.getsubtype
+
+ function nodes.start_of_par(n)
+ local s = getsubtype(n)
+ return s == hmodepar_code or s == vmodepar_code
+ end
+
end