summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-basics-nod.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-07-15 22:56:45 +0000
committerKarl Berry <karl@freefriends.org>2014-07-15 22:56:45 +0000
commit6caf348b43edcfc1dce127bf0895a5fb9bd77f2d (patch)
tree7b4b79f90596e69716ad87e3293743756b2a1954 /Master/texmf-dist/tex/luatex/luaotfload/luaotfload-basics-nod.lua
parentd71cd04a4c07d1cdaf85a7b7c2398022cc39beab (diff)
luaotfload (15jul14)
git-svn-id: svn://tug.org/texlive/trunk@34622 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload-basics-nod.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-basics-nod.lua15
1 files changed, 13 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-basics-nod.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-basics-nod.lua
index 50a1e862790..373dab5a8c7 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-basics-nod.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-basics-nod.lua
@@ -54,22 +54,33 @@ nodes.handlers = { }
local nodecodes = { } for k,v in next, node.types () do nodecodes[string.gsub(v,"_","")] = k end
local whatcodes = { } for k,v in next, node.whatsits() do whatcodes[string.gsub(v,"_","")] = k end
local glyphcodes = { [0] = "character", "glyph", "ligature", "ghost", "left", "right" }
+local disccodes = { [0] = "discretionary", "explicit", "automatic", "regular", "first", "second" }
nodes.nodecodes = nodecodes
nodes.whatcodes = whatcodes
nodes.whatsitcodes = whatcodes
nodes.glyphcodes = glyphcodes
+nodes.disccodes = disccodes
local free_node = node.free
local remove_node = node.remove
local new_node = node.new
local traverse_id = node.traverse_id
-local math_code = nodecodes.math
-
nodes.handlers.protectglyphs = node.protect_glyphs
nodes.handlers.unprotectglyphs = node.unprotect_glyphs
+local math_code = nodecodes.math
+local end_of_math = node.end_of_math
+
+function node.end_of_math(n)
+ if n.id == math_code and n.subtype == 1 then
+ return n
+ else
+ return end_of_math(n)
+ end
+end
+
function nodes.remove(head, current, free_too)
local t = current
head, current = remove_node(head,current)