Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix: Don't link to undocumented types in API docs" #14908

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading