Skip to content

Commit

Permalink
Fix bug where private/protected methods were hidden in a class nested…
Browse files Browse the repository at this point in the history
… in a :showdoc: class
  • Loading branch information
nobodywasishere committed Dec 19, 2024
1 parent fb52146 commit cd722b6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions src/compiler/crystal/tools/doc/generator.cr
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,6 @@ 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
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/crystal/tools/doc/type.cr
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class Crystal::Doc::Type
end

private def showdoc?(adef)
@generator.showdoc?(adef.doc.try &.strip) || @generator.showdoc?(self)
@generator.showdoc?(adef.doc.try &.strip) || @generator.showdoc?(@type)
end

private def sort_order(item)
Expand Down

0 comments on commit cd722b6

Please sign in to comment.