docs: Don't display any inheritance info if we do not inherit

This commit is contained in:
Andy Williams 2017-12-13 10:06:37 +00:00
parent d5d130085a
commit e747e1ec2a
1 changed files with 7 additions and 10 deletions

View File

@ -962,22 +962,19 @@ local build_class = function(cl)
f:write_editable(cln, "description")
f:write_nl()
f:write_h("Inheritance", 2)
local inherits = cl:inherits_get()
if #inherits ~= 0 then
f:write_h("Inheritance", 2)
f:write_raw(build_inherit_summary(inherits[1]):finish())
end
f:write_nl()
f:write_nl()
if writer.has_feature("dot") then
f:write_nl(2)
f:write_folded("Full hierarchy", function()
f:write_list(build_inherits(cl))
end)
f:write_nl()
end
f:write_folded("Full hierarchy", function()
f:write_list(build_inherits(cl))
end)
f:write_nl()
local written = {}
local ievs = {}
local meths, omeths = {}, {}