summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/scrp-ini.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-05-19 18:48:15 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-05-19 18:48:15 +0200
commitf1772caf425af2fe9be87b788eae63559682d51a (patch)
treece9a813989227bea7191db7a8f8bc87ad6d578dd /tex/context/base/mkiv/scrp-ini.lua
parent330909ad62342ff873dc758b909968c66d0252a4 (diff)
downloadcontext-f1772caf425af2fe9be87b788eae63559682d51a.tar.gz
2021-05-19 18:21:00
Diffstat (limited to 'tex/context/base/mkiv/scrp-ini.lua')
-rw-r--r--tex/context/base/mkiv/scrp-ini.lua29
1 files changed, 26 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/scrp-ini.lua b/tex/context/base/mkiv/scrp-ini.lua
index 0fafd9854..857d2ac6e 100644
--- a/tex/context/base/mkiv/scrp-ini.lua
+++ b/tex/context/base/mkiv/scrp-ini.lua
@@ -57,9 +57,6 @@ local setglyphdata = nuts.setglyphdata
local isglyph = nuts.isglyph
-local insertnodeafter = nuts.insertafter
-local insertnodebefore = nuts.insertbefore
-
local firstglyph = nuts.firstglyph
local nextglyph = nuts.traversers.glyph
@@ -86,6 +83,9 @@ scripts.injectors = handlers
local splitters = allocate()
scripts.splitters = splitters
+local helpers = allocate()
+scripts.helpers = helpers
+
-- we need to fake it in luatex
local getscript = node.direct.getscript
@@ -116,6 +116,29 @@ if not getscript then
end
+local insertnodebefore, insertnodeafter do
+
+ local insertafter = nuts.insertnodeafter
+ local insertbefore = nuts.insertnodebefore
+ local setattributelist = nuts.setattributelist
+
+ local function insertnodebefore(head,current,what) -- todo : lmtx
+ head, current = insertbefore(head,current,what)
+ setattributelist(what,current)
+ return head, current
+ end
+
+ local function insertnodeafter(head,current,what) -- todo : lmtx
+ head, current = insertafter(head,current,what)
+ setattributelist(what,current)
+ return head, current
+ end
+
+ helpers.insertnodebefore = insertnodebefore
+ helpers.insertnodeafter = insertnodeafter
+
+end
+
local hash = { -- we could put these presets in char-def.lua
--
-- half width opening parenthesis