From fb98cc767dd605922746a448f513de1554626020 Mon Sep 17 00:00:00 2001 From: steve donovan Date: Sun, 3 Jul 2011 10:26:24 +0200 Subject: [PATCH] (1) pattern for @see references did not include underscore (2) hack for grabbing block comment foiled by '--]]' --- ldoc/tools.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ldoc/tools.lua b/ldoc/tools.lua index 4417871..f0f7d1e 100644 --- a/ldoc/tools.lua +++ b/ldoc/tools.lua @@ -130,7 +130,7 @@ end function M.expand_comma_list (ls) local new_ls = List() for s in ls:iter() do - s = s:gsub('[^%.:%w]*$','') + s = s:gsub('[^%.:%w_]*$','') if s:find ',' then new_ls:extend(List.split(s,'%s*,%s*')) else @@ -323,13 +323,18 @@ end function M.grab_block_comment (v,tok,end1,end2) local res = {v} local t,last_v + local t12 = end1..end2 + k = 1 repeat last_v = v t,v = tok() + if t=='comment' and v:find(t12,1,true) then t12 = nil; break end append(res,v) until last_v == end1 and v == end2 - table.remove(res) - table.remove(res) + if t12 then + table.remove(res) + table.remove(res) + end res = table.concat(res) return 'comment',res end