kludge for cases of closing void tags

Signed-off-by: Vadim A. Misbakh-Soloviov <git@mva.name>
This commit is contained in:
Vadim A. Misbakh-Soloviov 2015-09-03 22:07:47 +06:00
parent 0938f8424b
commit 66c03644e0
No known key found for this signature in database
GPG Key ID: 26503D349B3B334B

View File

@ -53,7 +53,7 @@ local function parse(text)
local closestart, closing, closename
closestart, closeend, closing, closename = string.find(root._text, "[^<]*<(/?)(%w+)", closeend)
if not closing or closing == "" then break end
tag = table.remove(opentags[closename]) or tag -- kludge for cases of closing tag that wasn't opened
tag = table.remove(opentags[closename] or {}) or tag -- kludges for the cases of closing void or non-opened tags
closestart = string.find(root._text, "<", closestart)
tag:close(closestart, closeend + 1)
node = tag.parent