Permalink
Browse files

Merge pull request #172 from github/fix_section_template

Fix anchor href rendering for Section anchors
  • Loading branch information...
2 parents 43bbbf4 + badb593 commit 8eee539d67d6646635d23f98a0fd8b291b2d6e9d @bry4n bry4n committed Aug 2, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 templates/section.html.erb
@@ -1,11 +1,8 @@
-<% if !anchor.nil? %>
- <a name="<%= anchor %>">
-<% end %>
<div class="sect<%= level %>">
- <h<%= level + 1 %> id="<%= section_id %>"><%= name %></h<%= level + 1 %>>
<% if !anchor.nil? %>
- </a>
+ <a name='<%= anchor %>'></a>
<% end %>
+ <h<%= level + 1 %> id="<%= section_id %>"><%= name %></h<%= level + 1 %>>
<% if level == 1 %>
<div class="sectionbody"><%= content %></div>
<% else %>

0 comments on commit 8eee539

Please sign in to comment.