diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-12-10 23:15:04 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-12-10 23:15:04 +0100 |
commit | 561708843a2c7fd2d69186fe22fdec99908a64d9 (patch) | |
tree | 689f5c655ff407e7ff26973a4db1078b8c2a9095 /tex/context/base/lang-hyp.lua | |
parent | 7b68e6df9eb6d5c9f216c333051ccafce11bf3fb (diff) | |
download | context-561708843a2c7fd2d69186fe22fdec99908a64d9.tar.gz |
2014-12-10 22:42:00
Diffstat (limited to 'tex/context/base/lang-hyp.lua')
-rw-r--r-- | tex/context/base/lang-hyp.lua | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/tex/context/base/lang-hyp.lua b/tex/context/base/lang-hyp.lua index 6bbc17fca..2ab966fe6 100644 --- a/tex/context/base/lang-hyp.lua +++ b/tex/context/base/lang-hyp.lua @@ -1188,14 +1188,17 @@ if context then end language = lang if language > 0 then + -- dictionary = dictionaries[language] - -- we could postpone these instance = dictionary.instance characters = dictionary.characters unicodes = dictionary.unicodes - leftchar = leftchar or (instance and posthyphenchar(instance)) - rightchar = rightchar or (instance and prehyphenchar (instance)) - leftmin = leftcharmin or getfield(current,"left") + -- + local a = getattr(current,a_hyphenation) + attr = synchronizefeatureset(a) + leftchar = leftchar or (instance and posthyphenchar(instance)) + rightchar = rightchar or (instance and prehyphenchar (instance)) + leftmin = leftcharmin or getfield(current,"left") rightmin = rightcharmin or getfield(current,"right") if not leftchar or leftchar < 0 then leftchar = false @@ -1204,11 +1207,6 @@ if context then rightchar = false end -- - local a = getattr(current,a_hyphenation) - if a ~= attr then - attr = synchronizefeatureset(a) -- influences extrachars - end - -- local char = unicodes[code] or (extrachars and extrachars[code]) if char then word[1] = char @@ -1246,7 +1244,17 @@ if context then else local a = getattr(current,a_hyphenation) if a ~= attr then - attr = synchronizefeatureset(a) -- influences extrachars + attr = synchronizefeatureset(a) -- influences extrachars + leftchar = leftchar or (instance and posthyphenchar(instance)) + rightchar = rightchar or (instance and prehyphenchar (instance)) + leftmin = leftcharmin or getfield(current,"left") + rightmin = rightcharmin or getfield(current,"right") + if not leftchar or leftchar < 0 then + leftchar = false + end + if not rightchar or rightchar < 0 then + rightchar = false + end end -- local char = unicodes[code] or (extrachars and extrachars[code]) |