diff --git a/docgen/eolian_utils.lua b/docgen/eolian_utils.lua index a67cd1c..37aa645 100644 --- a/docgen/eolian_utils.lua +++ b/docgen/eolian_utils.lua @@ -716,11 +716,30 @@ find_callables = function(cl, omeths, events, written, no_overrides) end end +local has_custom_doc = function(impl, cl, no_overrides) + -- we don't care, let it pass + if not no_overrides then + return true + end + -- defined in this class, always has its own doc + if impl:class_get() == cl then + return true + end + -- otherwise check if this has *any* part of doc... + if impl:documentation_get(eolian.function_type.PROP_GET) or + impl:documentation_get(eolian.function_type.PROP_SET) or + impl:documentation_get(eolian.function_type.UNRESOLVED) + then + return true + end + return false +end + M.callables_get = function(cl, no_overrides) local written = {} local meths, omeths, evs = {}, {}, {} for impl in cl:implements_get() do - if not no_overrides or impl:class_get() == cl then + if has_custom_doc(impl, cl, no_overrides) then local ifunc = impl:function_get() written[M.obj_id_get(ifunc)] = true meths[#meths + 1] = { cl, impl } diff --git a/gendoc.lua b/gendoc.lua index e28d130..8f1c011 100644 --- a/gendoc.lua +++ b/gendoc.lua @@ -451,7 +451,7 @@ local build_class = function(cl) f:write_nl() end - local meths, omeths, ievs = eoutils.callables_get(cl) + local meths, omeths, ievs = eoutils.callables_get(cl, true) f:write_h("Members", 2) write_functable(f, cl, meths, true)