diff options
Diffstat (limited to 'tex/context/base/mkiv/lxml-aux.lua')
-rw-r--r-- | tex/context/base/mkiv/lxml-aux.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/lxml-aux.lua b/tex/context/base/mkiv/lxml-aux.lua index abe36837e..9a829795d 100644 --- a/tex/context/base/mkiv/lxml-aux.lua +++ b/tex/context/base/mkiv/lxml-aux.lua @@ -257,7 +257,17 @@ function xml.replace(root,pattern,whatever) report('replacing',pattern,c,e) end local d = p.dt - d[e.ni] = copiedelement(element,p) + local n = e.ni + local t = copiedelement(element,p) + if type(t) == "table" then + d[n] = t[1] + for i=2,#t do + n = n + 1 + insert(d,n,t[i]) + end + else + d[n] = t + end redo_ni(d) -- probably not needed end end |