Skip to content

Commit

Permalink
Revert "Fix: Don't link to undocumented types in API docs" (#14908)
Browse files Browse the repository at this point in the history
This reverts commit 78c9282.
  • Loading branch information
straight-shoota committed Aug 19, 2024
1 parent f3fb7b6 commit 95a761e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/compiler/crystal/tools/doc/html/type.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ <h2>
<code><%= type.formatted_alias_definition %></code>
<% end %>

<%= OtherTypesTemplate.new("Included Modules", type, included_modules_with_docs) %>
<%= OtherTypesTemplate.new("Extended Modules", type, extended_modules_with_docs) %>
<%= OtherTypesTemplate.new("Direct Known Subclasses", type, subclasses_with_docs) %>
<%= OtherTypesTemplate.new("Direct including types", type, including_types_with_docs) %>
<%= OtherTypesTemplate.new("Included Modules", type, type.included_modules) %>
<%= OtherTypesTemplate.new("Extended Modules", type, type.extended_modules) %>
<%= OtherTypesTemplate.new("Direct Known Subclasses", type, type.subclasses) %>
<%= OtherTypesTemplate.new("Direct including types", type, type.including_types) %>

<% if locations = type.locations %>
<h2>
Expand Down Expand Up @@ -99,7 +99,7 @@ <h2>
<%= MethodSummaryTemplate.new("Instance Method Summary", type.instance_methods) %>

<div class="methods-inherited">
<% ancestors_with_docs.each do |ancestor| %>
<% type.ancestors.each do |ancestor| %>
<%= MethodsInheritedTemplate.new(type, ancestor, ancestor.instance_methods, "Instance") %>
<%= MethodsInheritedTemplate.new(type, ancestor, ancestor.constructors, "Constructor") %>
<%= MethodsInheritedTemplate.new(type, ancestor, ancestor.class_methods, "Class") %>
Expand Down
6 changes: 0 additions & 6 deletions src/compiler/crystal/tools/doc/templates.cr
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ module Crystal::Doc
end

record TypeTemplate, type : Type, types : Array(Type), project_info : ProjectInfo do
{% for method in %w[ancestors included_modules extended_modules subclasses including_types] %}
def {{method.id}}_with_docs
type.{{method.id}}.select!(&.in?(types))
end
{% end %}

ECR.def_to_s "#{__DIR__}/html/type.html"
end

Expand Down

0 comments on commit 95a761e

Please sign in to comment.