From 4fac99406c1761b4010b0584ec7179d88e799c82 Mon Sep 17 00:00:00 2001 From: Steve Donovan Date: Thu, 21 Nov 2013 16:06:34 +0200 Subject: [PATCH] try match single names against fully qualified names of module funtions --- ldoc/doc.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ldoc/doc.lua b/ldoc/doc.lua index 7e80070..2073bef 100644 --- a/ldoc/doc.lua +++ b/ldoc/doc.lua @@ -1114,6 +1114,16 @@ function Module:process_see_reference (s,modules,istype) mod_ref = modules.by_name[self.package..'.'..s] if ismod(mod_ref) then return reference(s, mod_ref,nil) end fun_ref = self.items.by_name[s] + -- did not get an exact match, so try to match by the unqualified fun name + if not fun_ref then + local patt = '[.:]'..s..'$' + for qname,ref in pairs(self.items.by_name) do + if qname:match(patt) then + fun_ref = ref + break + end + end + end if fun_ref then return reference(s,self,fun_ref) else local ref = lua_manual_ref (s)