Skip to content

Commit

Permalink
Merge pull request #172 from github/fix_section_template
Browse files Browse the repository at this point in the history
Fix anchor href rendering for Section anchors
  • Loading branch information
bry4n committed Aug 2, 2012
2 parents 43bbbf4 + badb593 commit 8eee539
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions templates/section.html.erb
@@ -1,11 +1,8 @@
<% if !anchor.nil? %>
<a name="<%= anchor %>">
<% end %>
<div class="sect<%= level %>"> <div class="sect<%= level %>">
<h<%= level + 1 %> id="<%= section_id %>"><%= name %></h<%= level + 1 %>>
<% if !anchor.nil? %> <% if !anchor.nil? %>
</a> <a name='<%= anchor %>'></a>
<% end %> <% end %>
<h<%= level + 1 %> id="<%= section_id %>"><%= name %></h<%= level + 1 %>>
<% if level == 1 %> <% if level == 1 %>
<div class="sectionbody"><%= content %></div> <div class="sectionbody"><%= content %></div>
<% else %> <% else %>
Expand Down

0 comments on commit 8eee539

Please sign in to comment.