diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-04-13 15:51:39 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-04-13 15:51:39 +0200 |
commit | 25fcad7435f56cdce2658336909f4da6a65589c0 (patch) | |
tree | c23d5d04a7e86c7ddc2ebeca06d3de63ebdc806e /tex/context/base/mkiv/back-exp.lua | |
parent | 1e5d7f41ddede5e6400a2a7762032823d3545df4 (diff) | |
download | context-25fcad7435f56cdce2658336909f4da6a65589c0.tar.gz |
2018-04-13 15:02:00
Diffstat (limited to 'tex/context/base/mkiv/back-exp.lua')
-rw-r--r-- | tex/context/base/mkiv/back-exp.lua | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/back-exp.lua b/tex/context/base/mkiv/back-exp.lua index b18679fa2..26efe6aad 100644 --- a/tex/context/base/mkiv/back-exp.lua +++ b/tex/context/base/mkiv/back-exp.lua @@ -118,6 +118,7 @@ local tonut = nuts.tonut local getnext = nuts.getnext local getsubtype = nuts.getsubtype local getfont = nuts.getfont +local getchar = nuts.getchar local getdisc = nuts.getdisc local getcomponents = nuts.getcomponents local getlist = nuts.getlist @@ -167,7 +168,7 @@ local currentparagraph = nil local noftextblocks = 0 -local hyphencode = 0xAD +----- hyphencode = 0xAD local hyphen = utfchar(0xAD) -- todo: also emdash etc local tagsplitter = structurestags.patterns.splitter ----- colonsplitter = lpeg.splitat(":") @@ -2748,9 +2749,12 @@ end local function collectresults(head,list,pat,pap) -- is last used (we also have currentattribute) local p - for n in traverse_nodes(head) do - local c, id = isglyph(n) -- 14: image, 8: literal (mp) - if c then +-- for n in traverse_nodes(head) do +-- local c, id = isglyph(n) -- 14: image, 8: literal (mp) +-- if c then + for n, id in traverse_nodes(head) do + if id == glyph_code then + local c = getchar(n) local at = getattr(n,a_tagged) or pat if not at then -- we need to tag the pagebody stuff as being valid skippable @@ -2855,7 +2859,7 @@ local function collectresults(head,list,pat,pap) -- is last used (we also have c elseif id == disc_code then -- probably too late local pre, post, replace = getdisc(n) if keephyphens then - if pre and not getnext(pre) and isglyph(pre) == hyphencode then + if pre and not getnext(pre) and isglyph(pre) == 0xAD then -- hyphencode then nofcurrentcontent = nofcurrentcontent + 1 currentcontent[nofcurrentcontent] = hyphen end |