summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-12-13 10:06:37 +0000
committerAndy Williams <andy@andywilliams.me>2017-12-13 10:08:21 +0000
commite747e1ec2a4991ff53c854327ee66033686d7503 (patch)
tree53bd92f424ed66c8b6812dc83f5e5f89afa814b5
parentd5d130085af045d3ee5736afc0649cc2ace47860 (diff)
docs: Don't display any inheritance info if we do not inherit
-rw-r--r--src/scripts/elua/apps/gendoc.lua17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua
index 6de63b7131..1ace16fb29 100644
--- a/src/scripts/elua/apps/gendoc.lua
+++ b/src/scripts/elua/apps/gendoc.lua
@@ -962,22 +962,19 @@ local build_class = function(cl)
962 f:write_editable(cln, "description") 962 f:write_editable(cln, "description")
963 f:write_nl() 963 f:write_nl()
964 964
965 f:write_h("Inheritance", 2)
966 local inherits = cl:inherits_get() 965 local inherits = cl:inherits_get()
967 if #inherits ~= 0 then 966 if #inherits ~= 0 then
967 f:write_h("Inheritance", 2)
968
968 f:write_raw(build_inherit_summary(inherits[1]):finish()) 969 f:write_raw(build_inherit_summary(inherits[1]):finish())
969 end 970 f:write_nl()
970 f:write_nl()
971 971
972 if writer.has_feature("dot") then 972 f:write_folded("Full hierarchy", function()
973 f:write_nl(2) 973 f:write_list(build_inherits(cl))
974 end)
975 f:write_nl()
974 end 976 end
975 977
976 f:write_folded("Full hierarchy", function()
977 f:write_list(build_inherits(cl))
978 end)
979 f:write_nl()
980
981 local written = {} 978 local written = {}
982 local ievs = {} 979 local ievs = {}
983 local meths, omeths = {}, {} 980 local meths, omeths = {}, {}