Removed accidental white line.

This commit is contained in:
Yann Muller
2018-10-22 18:17:03 +01:00
committed by Frans de Jonge
parent 9c251185eb
commit f747b24a45

View File

@@ -40,7 +40,6 @@ function OPDSParser:createFlatXTable(xlex, curr_element)
local txt
for event, offset, size in xlex:Lexemes() do
txt = ffi.string(xlex.buf + offset, size)
if event == luxl.EVENT_START then
if txt ~= "xml" then
-- does current element already have something
@@ -80,7 +79,7 @@ function OPDSParser:parse(text)
-- but will kick the ass of luxl
text = text:gsub("<br>", "<br />")
text = text:gsub("<br/>", "<br />")
-- some OPDS catalogs wrap text in a CDATA marker, remove it as it causes parsing problems
-- some OPDS catalogs wrap text in a CDATA section, remove it as it causes parsing problems
text = text:gsub("<!%[CDATA%[(.-)%]%]>","%1")
local xlex = luxl.new(text, #text)
return self:createFlatXTable(xlex)