Merge pull request #184 from mooffie/custom_display_name_for_project_level_items_too
Make custom_display_name work for project-level items
This commit is contained in:
commit
69a4419420
|
@ -176,6 +176,11 @@ function ldoc.source_ref (fun)
|
|||
end
|
||||
|
||||
function ldoc.default_display_name(item)
|
||||
-- Project-level items:
|
||||
if doc.project_level(item.type) then
|
||||
return ldoc.module_name(item)
|
||||
end
|
||||
-- Module-level items:
|
||||
local name = item.display_name or item.name
|
||||
if item.type == 'function' or item.type == 'lfunction' then
|
||||
if not ldoc.no_space_before_args then
|
||||
|
|
|
@ -66,7 +66,7 @@ return [==[
|
|||
# if ldoc.allowed_in_contents(type,module) then
|
||||
<h2>$(kind)</h2>
|
||||
<ul class="$(kind=='Topics' and '' or 'nowrap'">
|
||||
# for mod in mods() do local name = ldoc.module_name(mod)
|
||||
# for mod in mods() do local name = display_name(mod)
|
||||
# if mod.name == this_mod then
|
||||
<li><strong>$(name)</strong></li>
|
||||
# else
|
||||
|
|
Loading…
Reference in New Issue