From 3bc02e08823ca9d94cd3da01161ec511c9fdec3f Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 26 Jun 2020 14:36:32 +0200 Subject: 2020-06-26 13:28:00 --- tex/context/base/mkiv/back-exp.lua | 43 +++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 17 deletions(-) (limited to 'tex/context/base/mkiv/back-exp.lua') diff --git a/tex/context/base/mkiv/back-exp.lua b/tex/context/base/mkiv/back-exp.lua index 3b9a8f3ac..da2301db7 100644 --- a/tex/context/base/mkiv/back-exp.lua +++ b/tex/context/base/mkiv/back-exp.lua @@ -710,24 +710,26 @@ do function fixes.linenumber(di,data,i) local ni = data[i+1] - if ni and ni.data then - while true do - local d = ni.data[1] - if d then - local e = d.element - if e then - if e == "line" or e == "verbatimline" then - table.insert(d.data,1,di) - data[i] = false - return + if ni then + if ni.data then + while true do + local d = ni.data[1] + if d then + local e = d.element + if e then + if e == "line" or e == "verbatimline" then + insert(d.data,1,di) + data[i] = false + return + else + ni = d + end else - ni = d + return end else return end - else - return end end end @@ -2523,6 +2525,8 @@ do -- skip elseif di.skip == "ignore" then -- skip (new) +elseif di.tg == "ignore" then + -- skip (new) elseif di.content then if di.samepar then prevparnumber = false @@ -2607,8 +2611,8 @@ do -- i.e cell attribute local function collapsetree(tree) - for tag, trees in sortedhash(treehash) do --- for tag, trees in next, treehash do +-- for tag, trees in sortedhash(treehash) do + for tag, trees in next, treehash do local d = trees[1].data -- print("!!!!!!!!",tag) -- inspect(trees) @@ -3340,6 +3344,9 @@ local collectresults do -- too many locals otherwise elseif id == kern_code then local kern = getkern(n) if kern > 0 then +local a = getattr(n,a_tagged) or pat +local t = taglist[a] +if not t or t.tagname ~= "ignore" then -- maybe earlier on top) local limit = threshold if p then local c, f = isglyph(p) @@ -3349,7 +3356,7 @@ local collectresults do -- too many locals otherwise end if kern > limit then if last and not somespace[currentcontent[nofcurrentcontent]] then - local a = getattr(n,a_tagged) or pat +-- local a = getattr(n,a_tagged) or pat if a == last then if not somespace[currentcontent[nofcurrentcontent]] then if trace_export then @@ -3370,12 +3377,14 @@ local collectresults do -- too many locals otherwise end nofcurrentcontent = nofcurrentcontent + 1 currentcontent[nofcurrentcontent] = " " - currentnesting = taglist[last] +-- currentnesting = taglist[last] +currentnesting = t pushentry(currentnesting) currentattribute = last end end end +end end elseif id == whatsit_code then if subtype == userdefinedwhatsit_code then -- cgit v1.2.3