summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/node-rul.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-07-27 17:53:52 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-07-27 17:53:52 +0200
commitab56ea38d2f4f5b521ef097bac92812f6070ef55 (patch)
treee5f2ba9e66f1b1ef8f7b32f91aed0d744a14a0da /tex/context/base/mkiv/node-rul.lua
parentf7bfb1deb04d4ad101dbabf4d635d33cd98aa0a1 (diff)
downloadcontext-ab56ea38d2f4f5b521ef097bac92812f6070ef55.tar.gz
2017-07-27 16:23:00
Diffstat (limited to 'tex/context/base/mkiv/node-rul.lua')
-rw-r--r--tex/context/base/mkiv/node-rul.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/node-rul.lua b/tex/context/base/mkiv/node-rul.lua
index b6cb9c167..316c3fded 100644
--- a/tex/context/base/mkiv/node-rul.lua
+++ b/tex/context/base/mkiv/node-rul.lua
@@ -128,13 +128,16 @@ local rules = nodes.rules or { }
nodes.rules = rules
rules.data = rules.data or { }
+local nutrules = nuts.rules or { }
+nuts.rules = nutrules -- not that many
+
storage.register("nodes/rules/data", rules.data, "nodes.rules.data")
local data = rules.data
-- we implement user rules here as it takes less code this way
-local function userrule(t,noattributes)
+local function usernutrule(t,noattributes)
local r = new_userrule(t.width or 0,t.height or 0,t.depth or 0)
if noattributes == false or noattributes == nil then
-- avoid fuzzy ones
@@ -142,7 +145,13 @@ local function userrule(t,noattributes)
setattrlist(r,current_attr())
end
properties[r] = t
- return tonode(r)
+ return r
+end
+
+nutrules.userrule = usernutrule
+
+local function userrule(t,noattributes)
+ return tonode(usernutrule(t,noattributes))
end
rules.userrule = userrule