reworking tpl detection; fixes #50

This commit is contained in:
Vadim A. Misbakh-Soloviov
2017-07-22 19:00:38 +07:00
parent 404de0b9be
commit 2e2f306e7f
2 changed files with 53 additions and 25 deletions

View File

@@ -1,3 +1,4 @@
-- vim: ft=lua ts=2 sw=2
-- Omit next line in actual module clients; it's only to support development of the module itself
package.path = "../src/?.lua;" .. package.path
@@ -308,6 +309,19 @@ end
function test_loop_limit()
local tree = htmlparser.parse([[
<a id='1>2'>moo</a>
<a id='2>3'>moo</a>
<b id='foo<bar'>moo</b>
<img <%tpl%> foo=bar></img>
<img <%tpl%> />
<img <%tpl%>></img>
<img <%tpl%>/>
<i <=moo=>>k</i>
<s <-foo->>o</s>
<div <*bar*>></div>
<p>
<a id="unclosed>Element"> with unclosed attribute</a>
</p>
<div data-pic="aa<%=image_url%>bb" ></div>
]]) -- issue#42
assert(1==1)