diff --git a/src/compiler/crystal/tools/doc/generator.cr b/src/compiler/crystal/tools/doc/generator.cr index e956ac8c3012..d146101b069e 100644 --- a/src/compiler/crystal/tools/doc/generator.cr +++ b/src/compiler/crystal/tools/doc/generator.cr @@ -234,6 +234,16 @@ class Crystal::Doc::Generator false end + def showdoc?(obj) + return false if !@program.wants_doc? + + if showdoc?(obj.doc.try &.strip) + return true + end + + false + end + def crystal_builtin?(type) return false unless project_info.crystal_stdlib? # TODO: Enabling this allows links to `NoReturn` to work, but has two `NoReturn`s show up in the sidebar