summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/lang-hyp.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-01-12 08:12:50 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-01-12 08:12:50 +0100
commitd0edf3e90e8922d9c672f24ecdc5d44fe2716f31 (patch)
tree5b618b87aa5078a8c744c94bbf058d69cd7111b2 /tex/context/base/mkiv/lang-hyp.lua
parent409a95f63883bd3b91699d39645e39a8a761457c (diff)
downloadcontext-d0edf3e90e8922d9c672f24ecdc5d44fe2716f31.tar.gz
2018-01-08 23:11:00
Diffstat (limited to 'tex/context/base/mkiv/lang-hyp.lua')
-rw-r--r--tex/context/base/mkiv/lang-hyp.lua53
1 files changed, 2 insertions, 51 deletions
diff --git a/tex/context/base/mkiv/lang-hyp.lua b/tex/context/base/mkiv/lang-hyp.lua
index 27bd8130e..53a368b07 100644
--- a/tex/context/base/mkiv/lang-hyp.lua
+++ b/tex/context/base/mkiv/lang-hyp.lua
@@ -688,10 +688,6 @@ if context then
local a_hyphenation = attributes.private("hyphenation")
- local expanders = languages.expanders -- gone in 1.005
- local expand_explicit = expanders and expanders[explicit_code]
- local expand_automatic = expanders and expanders[automatic_code]
-
local interwordpenalty = 5000
function traditional.loadpatterns(language)
@@ -1543,28 +1539,7 @@ featureset.hyphenonly = hyphenonly == v_yes
skipping = false
end
if id == disc_code then
- if expanded then
- -- pre 1.005
- local subtype = getsubtype(current)
- if subtype == discretionary_code then -- \discretionary
- size = 0
- elseif subtype == explicit_code then -- \- => only here
- -- automatic (-) : the old parser makes negative char entries
- size = 0
- expand_explicit(current)
- elseif subtype == automatic_code then -- - => only here
- -- automatic (-) : the old hyphenator turns an exhyphen into glyph+disc
- size = 0
- expand_automatic(current)
- else
- -- first : done by the hyphenator
- -- second : done by the hyphenator
- -- regular : done by the hyphenator
- size = 0
- end
- else
- size = 0
- end
+ size = 0
current = getnext(current)
if hyphenonly then
skipping = true
@@ -1634,7 +1609,6 @@ featureset.hyphenonly = hyphenonly == v_yes
-- local replaceaction = nodes.tasks.replaceaction -- no longer overload this way (too many local switches)
local hyphenate = lang.hyphenate
- local expanders = languages.expanders
local methods = { }
local usedmethod = false
local stack = { }
@@ -1644,29 +1618,6 @@ featureset.hyphenonly = hyphenonly == v_yes
return head, done
end
- local expanded = function (head)
- local done = hyphenate(head)
- return head, done
- end
-
- if LUATEXVERSION < 1.005 then
-
- expanded = function(head)
- local done = hyphenate(head)
- if done then
- for d in traverse_id(disc_code,tonut(head)) do
- local s = getsubtype(d)
- if s ~= discretionary_code then
- expanders[s](d,template)
- done = true
- end
- end
- end
- return head, done
- end
-
- end
-
local getcount = tex.getcount
hyphenators.methods = methods
@@ -1693,7 +1644,7 @@ featureset.hyphenonly = hyphenonly == v_yes
methods.tex = original
methods.original = original
- methods.expanded = expanded -- obsolete starting with 1.005
+ methods.expanded = original -- was expanded before 1.005
methods.traditional = languages.hyphenators.traditional.hyphenate
methods.none = false -- function(head) return head, false end