Skip to content

Commit

Permalink
Fix data-title attribute for H2 elements in TOC (#884)
Browse files Browse the repository at this point in the history
I believe the data-title attribute for H2 elements was mistakenly using the parent H1 content as its value, rather than its own content.
  • Loading branch information
benwilhelm authored and lord committed Sep 30, 2017
1 parent bdf8548 commit adf815e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/layouts/layout.erb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ under the License.
<ul class="toc-list-h2">
<% h1[:children].each do |h2| %>
<li>
<a href="#<%= h2[:id] %>" class="toc-h2 toc-link" data-title="<%= h1[:content] %>"><%= h2[:content] %></a>
<a href="#<%= h2[:id] %>" class="toc-h2 toc-link" data-title="<%= h2[:content] %>"><%= h2[:content] %></a>
</li>
<% end %>
</ul>
Expand Down

0 comments on commit adf815e

Please sign in to comment.