From: Nicolas Boisselier Date: Mon, 11 Jun 2018 03:03:00 +0000 (+0100) Subject: lib/lua/nb.lua X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=4185476dd63ec5b8cc33fd3d9171fdfffb739a3a;p=nb.git lib/lua/nb.lua --- diff --git a/lib/lua/nb.lua b/lib/lua/nb.lua index 9db7fa17..7cc7483d 100644 --- a/lib/lua/nb.lua +++ b/lib/lua/nb.lua @@ -76,9 +76,9 @@ function nb:ngx_location_tmpl(fheader,ffooter) elseif string.match(file,'%.html?$') then local i = '<[^>]+>' -- Extract title from h1 - if not vars.title then vars.title = string.match(content,']*>([^>]+)',1) end + if not vars.title then vars.title = string.match(content,']*>([^>]+)',1) end -- Extract title from h2 - if not vars.title then vars.title = string.match(content,']*>([^>]+)',1) end + if not vars.title then vars.title = string.match(content,']*>([^>]+)',1) end elseif not ngx.ctx.tmpl_content then ishtml = false