on left-hand side all module names go through doc.module_name. This strips off package part currently
This commit is contained in:
parent
df72613e57
commit
1d1ed6d0f0
|
@ -95,6 +95,14 @@ function html.generate_output(ldoc, args, project)
|
||||||
return (item.summary or '?')..' '..(item.description or '')
|
return (item.summary or '?')..' '..(item.description or '')
|
||||||
end
|
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
|
-- this generates the internal module/function references
|
||||||
function ldoc.href(see)
|
function ldoc.href(see)
|
||||||
if see.href then -- explict reference, e.g. to Lua manual
|
if see.href then -- explict reference, e.g. to Lua manual
|
||||||
|
|
|
@ -71,7 +71,7 @@ return [==[
|
||||||
# if mod.name == this_mod then -- highlight current module, link to others
|
# if mod.name == this_mod then -- highlight current module, link to others
|
||||||
<li><strong>$(mod.name)</strong></li>
|
<li><strong>$(mod.name)</strong></li>
|
||||||
# else
|
# 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
|
# end
|
||||||
# end
|
# end
|
||||||
|
|
Loading…
Reference in New Issue