diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-03-26 13:38:18 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-03-26 13:38:18 +0100 |
commit | 788487819ccf38a8478cc2afd88e0c0b088d0ec1 (patch) | |
tree | 215addbe3b9e293c2958227e7fc8923880b2e71f /tex/context/base/mkiv/lang-dis.lua | |
parent | adfe72d5a0c9d7bdc1bd7bc8faabb4d05e21d70a (diff) | |
download | context-788487819ccf38a8478cc2afd88e0c0b088d0ec1.tar.gz |
2016-03-26 13:07:00
Diffstat (limited to 'tex/context/base/mkiv/lang-dis.lua')
-rw-r--r-- | tex/context/base/mkiv/lang-dis.lua | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tex/context/base/mkiv/lang-dis.lua b/tex/context/base/mkiv/lang-dis.lua index ab62cc479..84d9b2d5b 100644 --- a/tex/context/base/mkiv/lang-dis.lua +++ b/tex/context/base/mkiv/lang-dis.lua @@ -29,6 +29,7 @@ local setsubtype = nuts.setsubtype local getchar = nuts.getchar local getdisc = nuts.getdisc local setdisc = nuts.setdisc +local isglyph = nuts.isglyph local copy_node = nuts.copy local free_node = nuts.free @@ -59,13 +60,19 @@ local expanders = { -- \- local pre, post, replace = getdisc(d) local done = false - if pre and getid(pre) == glyph_code and getchar(pre) <= 0 then - done = true - pre = nil + if pre then + local char = isglyph(pre) + if char and char <= 0 then + done = true + pre = nil + end end - if post and getid(post) == glyph_code and getchar(post) <= 0 then - done = true - post = nil + if post then + local char = isglyph(post) + if char and char <= 0 then + done = true + post = nil + end end if done then setdisc(d,pre,post,replace,discretionary_code,tex.exhyphenpenalty) |