Fix data-title attribute for H2 elements in TOC (#884)

I believe the data-title attribute for H2 elements was mistakenly using the parent H1 content as its value, rather than its own content.
This commit is contained in:
Ben
2017-09-30 16:39:15 -05:00
committed by Robert Lord
parent bdf8548cc7
commit adf815e35f

View File

@@ -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>