diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-12-16 19:08:50 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-12-16 19:08:50 +0100 |
commit | 37cca59f16fc3ab5bf3ce19fd94161d1c2f6ffdc (patch) | |
tree | 556706cc5366aa3b9bb371fe78c27e42ad625e46 /tex/context/base/mkiv/lpdf-tag.lua | |
parent | 3b6d2d411fdb8fdaef0a4b8045bfdc60a70ce4f0 (diff) | |
download | context-37cca59f16fc3ab5bf3ce19fd94161d1c2f6ffdc.tar.gz |
2019-12-16 18:46:00
Diffstat (limited to 'tex/context/base/mkiv/lpdf-tag.lua')
-rw-r--r-- | tex/context/base/mkiv/lpdf-tag.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/lpdf-tag.lua b/tex/context/base/mkiv/lpdf-tag.lua index 61a6999c1..11174c4db 100644 --- a/tex/context/base/mkiv/lpdf-tag.lua +++ b/tex/context/base/mkiv/lpdf-tag.lua @@ -376,6 +376,7 @@ function nodeinjections.addtags(head) root = { pref = pdfreference(structure_ref), kids = structure_kids } names = pdfarray() end + local function collectranges(head,list) for n, id in nextnode, head do if id == glyph_code then @@ -404,7 +405,10 @@ end -- end last = nil else - collectranges(getlist(n),n) + local list = getlist(n) + if list then + collectranges(list,n) + end end end end @@ -431,7 +435,6 @@ end local top = nil local noftop = 0 - local function inject(start,stop,list,literal,left,right) local prev = getprev(start) if prev then @@ -442,7 +445,7 @@ end else setlink(literal,start) end - if list and getlist(list) == start then + if list and not prev then setlist(list,literal) end local literal = copy_node(EMCliteral) @@ -502,7 +505,6 @@ end prev = prv end end - if prev then literal = pageliteral(makecontent(prev,id,specification)) elseif ignore then |