From 639db4a321fbbc034c56ef9f4a0e0c67dae556be Mon Sep 17 00:00:00 2001 From: Margret Riegert Date: Sun, 12 Jan 2025 00:19:31 -0500 Subject: [PATCH] Add missed showdoc? method --- src/compiler/crystal/tools/doc/generator.cr | 10 ++++++++++ 1 file changed, 10 insertions(+) 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