Skip to content

Commit adf815e

Browse files
benwilhelmlord
authored andcommitted
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.
1 parent bdf8548 commit adf815e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/layouts/layout.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ under the License.
7777
<ul class="toc-list-h2">
7878
<% h1[:children].each do |h2| %>
7979
<li>
80-
<a href="#<%= h2[:id] %>" class="toc-h2 toc-link" data-title="<%= h1[:content] %>"><%= h2[:content] %></a>
80+
<a href="#<%= h2[:id] %>" class="toc-h2 toc-link" data-title="<%= h2[:content] %>"><%= h2[:content] %></a>
8181
</li>
8282
<% end %>
8383
</ul>

0 commit comments

Comments
 (0)