Skip to content

Commit f4549c6

Browse files
author
Simeon F. Willbanks
committed
Remove #build_toc and move logic into #call, so all toc logic is within #call
1 parent bb203f2 commit f4549c6

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/html/pipeline/toc_filter.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,8 @@ def call
4242
header_content.add_previous_sibling(%Q{<a name="#{name}#{uniq}" class="anchor" href="##{name}#{uniq}"><span class="octicon octicon-link"></span></a>})
4343
end
4444
end
45-
build_toc
46-
doc
47-
end
48-
49-
# Private: Wrap Table of Contents list items within a container.
50-
def build_toc
5145
result[:toc] = %Q{<ul class="section-nav">\n#{result[:toc]}</ul>} unless result[:toc].empty?
46+
doc
5247
end
5348
end
5449
end

0 commit comments

Comments
 (0)