mirror of
https://github.com/msva/lua-htmlparser.git
synced 2024-11-04 23:34:20 +00:00
parser: fix #59, fix 60
This commit is contained in:
parent
7f380f69a6
commit
5a59532055
@ -221,7 +221,9 @@ local function parse(text,limit) -- {{{
|
|||||||
local closeend = tpos
|
local closeend = tpos
|
||||||
local closingloop
|
local closingloop
|
||||||
while true do -- TagCloseLoop {{{
|
while true do -- TagCloseLoop {{{
|
||||||
if voidelements[tag.name:lower()] then break end -- already closed
|
-- Can't remember why did I add that, so comment it for now (and not remove), in case it will be needed again
|
||||||
|
-- (although, it causes #59 and #60, so it will anyway be needed to rework)
|
||||||
|
-- if voidelements[tag.name:lower()] then break end -- already closed
|
||||||
if closingloop == limit then
|
if closingloop == limit then
|
||||||
err("Tag closing loop reached loop limit (%d). Consider either increasing it or checking HTML-code for syntax errors", limit)
|
err("Tag closing loop reached loop limit (%d). Consider either increasing it or checking HTML-code for syntax errors", limit)
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user