summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/lang-hyp.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-05-12 01:19:03 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-05-12 01:19:03 +0200
commit77e216e323271fb85d508b7206b13c980540b74b (patch)
tree5b4053c2bbe5190e28c0dce89653c7b13aea0642 /tex/context/base/mkiv/lang-hyp.lua
parentd817aef76ab8b606c02bd0636661b634b43a68a6 (diff)
downloadcontext-77e216e323271fb85d508b7206b13c980540b74b.tar.gz
2018-05-12 00:16:00
Diffstat (limited to 'tex/context/base/mkiv/lang-hyp.lua')
-rw-r--r--tex/context/base/mkiv/lang-hyp.lua26
1 files changed, 12 insertions, 14 deletions
diff --git a/tex/context/base/mkiv/lang-hyp.lua b/tex/context/base/mkiv/lang-hyp.lua
index e29446b65..d01f8b581 100644
--- a/tex/context/base/mkiv/lang-hyp.lua
+++ b/tex/context/base/mkiv/lang-hyp.lua
@@ -632,7 +632,6 @@ if context then
local regular_code = disccodes.regular
local nuts = nodes.nuts
- local tonut = nodes.tonut
local tonode = nodes.tonode
local nodepool = nuts.pool
@@ -666,7 +665,9 @@ if context then
local remove_node = nuts.remove
local end_of_math = nuts.end_of_math
local node_tail = nuts.tail
- local traverse_id = nuts.traverse_id
+
+ local nexthlist = nuts.traversers.hlist
+ local nextdisc = nuts.traversers.disc
local setcolor = nodes.tracers.colors.set
@@ -1028,9 +1029,7 @@ featureset.hyphenonly = hyphenonly == v_yes
function traditional.hyphenate(head)
- local first = tonut(head)
-
-
+ local first = head
local tail = nil
local last = nil
local current = first
@@ -1585,7 +1584,7 @@ featureset.hyphenonly = hyphenonly == v_yes
stoptiming(traditional)
- return head, true
+ return head
end
statistics.register("hyphenation",function()
@@ -1619,8 +1618,8 @@ featureset.hyphenonly = hyphenonly == v_yes
local stack = { }
local function original(head)
- local done = hyphenate(head)
- return head, done
+ hyphenate(tonode(head))
+ return head
end
local getcount = tex.getcount
@@ -1637,13 +1636,13 @@ featureset.hyphenonly = hyphenonly == v_yes
forced = false
return usedmethod(head)
else
- return head, false
+ return head
end
else
return usedmethod(head)
end
else
- return head, false
+ return head
end
end
@@ -1729,13 +1728,12 @@ featureset.hyphenonly = hyphenonly == v_yes
}
function nodes.stripdiscretionaries(head)
- local h = tonut(head)
- for l in traverse_id(hlist_code,h) do
- for d in traverse_id(disc_code,getlist(l)) do
+ for l in nexthlist, head do
+ for d in nextdisc, getlist(l) do
remove_node(h,false,true)
end
end
- return tonode(h)
+ return head
end