From 4185476dd63ec5b8cc33fd3d9171fdfffb739a3a Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Mon, 11 Jun 2018 04:03:00 +0100 Subject: [PATCH] lib/lua/nb.lua --- lib/lua/nb.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.3