presenting Lua methods as Class:name in a @type
This commit is contained in:
parent
a177ceaa59
commit
74531d7106
|
@ -153,6 +153,7 @@ function File:finish()
|
|||
-- if it was a class, then the name should be 'Class.foo'
|
||||
if this_mod.section.type == 'type' then
|
||||
item.name = this_mod.section.name .. '.' .. item.name
|
||||
item.display_name = this_mod.section.name .. ':' .. item.name
|
||||
end
|
||||
section_description = this_mod.section.description
|
||||
else -- otherwise, just goes into the default sections (Functions,Tables,etc)
|
||||
|
|
|
@ -71,8 +71,9 @@ function html.generate_output(ldoc, args, project)
|
|||
end
|
||||
|
||||
function ldoc.display_name(item)
|
||||
if item.type == 'function' then return item.name..' '..item.args
|
||||
else return item.name end
|
||||
local name = item.display_name or item.name
|
||||
if item.type == 'function' then return name..' '..item.args
|
||||
else return name end
|
||||
end
|
||||
|
||||
function ldoc.no_spaces(s) return (s:gsub('%s','_')) end
|
||||
|
|
Loading…
Reference in New Issue