]> git.nbdom.net Git - nb.git/commitdiff
lib/lua/nb.lua
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 22 May 2018 01:22:18 +0000 (02:22 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 22 May 2018 01:22:18 +0000 (02:22 +0100)
lib/lua/nb.lua

index c4dbf330f3fe3a10364f4dd96022865950eef3dc..667993048b3b1733e26d8e625f623d38ff4e5b5a 100644 (file)
@@ -117,10 +117,12 @@ function nb:ngx_location_tmpl(fheader,ffooter)
                -- class = inc:gsub('/index%.[%w]+$',''):match('^.*/([^/%.%?&]+)')
                -- id = inc:gsub('/index%.[%w]+$','')
                local name = self:filepath2name(inc)
-               inc_content = '<div'
-                       .. ' id="inc-' .. name .. '"'
-                       .. ' class="' .. name .. '"'
-               .. '>' .. inc_content .. '</div>'
+               if false then
+                       inc_content = '<div'
+                               .. ' id="inc-' .. name .. '"'
+                               .. ' class="' .. name .. '"'
+                       .. '>' .. inc_content .. '</div>'
+               end
          end
          content = ''
                .. content:sub(0,p1-1)
@@ -190,6 +192,7 @@ function nb:html_fix(content)
 
        content = content:gsub('<p><div','<div')
        content = content:gsub('div></p>','div>')
+       content = content:gsub('[%s]*<tr>[%s]*<th>[%s]*</th>[%s]*<th>[%s]*</th>[%s]*</tr>[%s]*','')
        return content
 end