diff options
author | Norbert Preining <preining@logic.at> | 2019-02-24 15:12:57 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2019-02-24 15:12:57 +0000 |
commit | 1314fbe93790c501dc436a5cf99f106b9e5c0f63 (patch) | |
tree | 04dc7734c8be8ffe385d41f4388826ef5857b6f9 /Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua | |
parent | eb80ce7b34f59896a1dfee5ca422495394d6677f (diff) |
Revert "ConTeXt version 2019.02.22 19:35"
This reverts commit 5c6357cdb820b4f628d036ba7b2248f221d50c0b.
git-svn-id: svn://tug.org/texlive/trunk@50112 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua index ed0f03fd8c7..78cf1d6bd58 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua @@ -134,12 +134,10 @@ end function xml.collect_tags(root, pattern, nonamespace) local collected = xmlapplylpath(root,pattern) if collected then - local t = { } - local n = 0 + local t, n = { }, 0 for c=1,#collected do - local e = collected[c] - local ns = e.ns - local tg = e.tg + local e = collected[c] + local ns, tg = e.ns, e.tg n = n + 1 if nonamespace then t[n] = tg @@ -228,7 +226,7 @@ function xml.delete(root,pattern) if trace_manipulations then report('deleting',pattern,c,e) end - local d = p.dt + local d = p.dt local ni = e.ni if ni <= #d then if false then @@ -315,10 +313,8 @@ local function inject_element(root,pattern,whatever,prepend) local element = root and xmltoelement(whatever,root) local collected = element and xmlapplylpath(root,pattern) local function inject_e(e) - local r = e.__p__ - local d = r.dt - local k = e.ni - local rri = r.ri + local r = e.__p__ + local d, k, rri = r.dt, e.ni, r.ri local edt = (rri and d[rri].dt) or (d and d[k] and d[k].dt) if edt then local be, af @@ -358,8 +354,7 @@ local function insert_element(root,pattern,whatever,before) -- todo: element als local collected = element and xmlapplylpath(root,pattern) local function insert_e(e) local r = e.__p__ - local d = r.dt - local k = e.ni + local d, k = r.dt, e.ni if not before then k = k + 1 end @@ -865,10 +860,8 @@ function xml.separate(x,pattern) report_xml("warning: xml.separate changes root") x = d end - local t = { "\n" } - local n = 1 - local i = 1 - local nd = #d + local t, n = { "\n" }, 1 + local i, nd = 1, #d while i <= nd do while i <= nd do local di = d[i] |