summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-01-20 23:19:52 +0000
committerKarl Berry <karl@freefriends.org>2014-01-20 23:19:52 +0000
commitc22509075f62a577b84ac0a4260769351460fd14 (patch)
tree404b9b458d848725bae68cc60b342c1c6d54c7dc /Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua
parent72cab7bce1d68c5d53ee82a50de80e3aa10950fb (diff)
luxaml (20jan14)
git-svn-id: svn://tug.org/texlive/trunk@32741 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua b/Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua
index 19e4ac11358..155ce28d9f3 100644
--- a/Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua
+++ b/Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua
@@ -200,7 +200,7 @@ local function simpleTreeHandler()
self:reduce(v,k,node)
end
end
- if table.getn(node) == 1 and not self.options.noreduce[key] and
+ if #node == 1 and not self.options.noreduce[key] and
node._attr == nil then
parent[key] = node[1]
else
@@ -214,7 +214,7 @@ local function simpleTreeHandler()
node._attr=a
end
- local current = self.stack[table.getn(self.stack)]
+ local current = self.stack[#self.stack]
if current[t] then
table.insert(current[t],node)
else
@@ -224,8 +224,8 @@ local function simpleTreeHandler()
end
obj.endtag = function(self,t,s)
- local current = self.stack[table.getn(self.stack)]
- local prev = self.stack[table.getn(self.stack)-1]
+ local current = self.stack[#self.stack]
+ local prev = self.stack[#self.stack-1]
if not prev[t] then
error("XML Error - Unmatched Tag ["..s..":"..t.."]\n")
end
@@ -237,7 +237,7 @@ local function simpleTreeHandler()
end
obj.text = function(self,t)
- local current = self.stack[table.getn(self.stack)]
+ local current = self.stack[#self.stack]
table.insert(current,t)
end