mirror of
https://github.com/msva/lua-htmlparser.git
synced 2024-11-04 23:34:20 +00:00
fix comments stripper (fixes #54)
This commit is contained in:
parent
f102657929
commit
4f6437ebd1
@ -41,7 +41,7 @@ local function parse(text,limit) -- {{{
|
|||||||
local tpl = false
|
local tpl = false
|
||||||
|
|
||||||
if not opts.keep_comments then -- Strip (or not) comments {{{
|
if not opts.keep_comments then -- Strip (or not) comments {{{
|
||||||
text = text:gsub("<!--.--->","") -- Many chances commented code will have syntax errors, that'll lead to parser failures
|
text = text:gsub("<!%-%-.-%-%->","") -- Many chances commented code will have syntax errors, that'll lead to parser failures
|
||||||
end -- }}}
|
end -- }}}
|
||||||
|
|
||||||
local tpr={}
|
local tpr={}
|
||||||
|
Loading…
Reference in New Issue
Block a user