on left-hand side all module names go through doc.module_name. This strips off package part currently

This commit is contained in:
Steve Donovan 2013-08-27 13:17:11 +02:00
parent df72613e57
commit 1d1ed6d0f0
2 changed files with 9 additions and 1 deletions

View File

@ -95,6 +95,14 @@ function html.generate_output(ldoc, args, project)
return (item.summary or '?')..' '..(item.description or '')
end
function ldoc.module_name (mod)
local name = mod.name
if mod.type == 'module' then
name = name:gsub('^.-%.','')
end
return name
end
-- this generates the internal module/function references
function ldoc.href(see)
if see.href then -- explict reference, e.g. to Lua manual

View File

@ -71,7 +71,7 @@ return [==[
# if mod.name == this_mod then -- highlight current module, link to others
<li><strong>$(mod.name)</strong></li>
# else
<li><a href="$(ldoc.ref_to_module(mod))">$(mod.name)</a></li>
<li><a href="$(ldoc.ref_to_module(mod))">$(ldoc.module_name(mod))</a></li>
# end
# end
# end