do not prepend class qualifier (Fred:) if the name already contains it

This commit is contained in:
steve donovan 2012-03-06 10:39:33 +02:00
parent cb7426005b
commit 536ee894d2
1 changed files with 5 additions and 1 deletions

View File

@ -186,7 +186,11 @@ function File:finish()
item.section = this_mod.section.display_name item.section = this_mod.section.display_name
-- if it was a class, then the name should be 'Class:foo' -- if it was a class, then the name should be 'Class:foo'
if this_mod.section.type == 'type' then if this_mod.section.type == 'type' then
item.name = this_mod.section.name .. ':' .. item.name local prefix = this_mod.section.name .. ':'
local i1,i2 = item.name:find(prefix)
if not (i1 == 1 and i2 == #prefix) then
item.name = prefix .. item.name
end
end end
section_description = this_mod.section.description section_description = this_mod.section.description
else -- otherwise, just goes into the default sections (Functions,Tables,etc) else -- otherwise, just goes into the default sections (Functions,Tables,etc)