presenting Lua methods as Class:name in a @type

This commit is contained in:
steve donovan 2011-09-11 19:17:05 +02:00
parent a177ceaa59
commit 74531d7106
2 changed files with 148 additions and 146 deletions

View File

@ -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)

View File

@ -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