Skip to content

Commit

Permalink
Merge pull request #251 from jonathanhefner/method-name-alias-proximity
Browse files Browse the repository at this point in the history
Move alias listing closer to method name
  • Loading branch information
jonathanhefner authored Jul 23, 2023
2 parents 1e05940 + 4288d9f commit 02eac0e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
22 changes: 11 additions & 11 deletions lib/rdoc/generator/template/rails/_context.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -137,24 +137,24 @@
</h3>
<%= link_to "Link", method, class: "permalink", name: method.aref %>

<% if method.comment %>
<div class="description">
<%= method.description.strip %>
</div>
<% end %>

<% unless method.aliases.empty? %>
<div class="aka">
<p class="aka">
Also aliased as:
<%# Sometimes a parent cannot be determined. See ruby/rdoc@85ebfe13dc. %>
<%= method.aliases.map { |aka| link_to aka.name, (aka if aka.parent) }.join(", ") %>
</div>
<%= method.aliases.map { |aka| link_to aka.name, (aka if aka.parent) }.join(", ") %>.
</p>
<% end %>

<% if alias_for = method.is_alias_for then %>
<div class="aka">
<p class="aka">
Alias for:
<%= link_to alias_for.name, alias_for %>
<%= link_to alias_for.name, alias_for %>.
</p>
<% end %>

<% if method.comment %>
<div class="description">
<%= method.description.strip %>
</div>
<% end %>

Expand Down
4 changes: 1 addition & 3 deletions lib/rdoc/generator/template/rails/resources/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,8 @@ tt {
}

.method .aka {
margin-top: 0.3em;
margin-left: 1em;
margin-left: 1.2em;
font-style: italic;
text-indent: 2em;
}

.method .source-link
Expand Down

0 comments on commit 02eac0e

Please sign in to comment.