Skip to content

Commit

Permalink
Merge pull request toshimaru#77 from gandalf3/toc_only_disable_fix
Browse files Browse the repository at this point in the history
Have toc_only return an empty string when toc is disabled
  • Loading branch information
toshimaru authored Mar 23, 2019
2 parents 6c9c092 + 54282e5 commit c2b783c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jekyll-toc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module Jekyll
# Jekyll Table of Contents filter plugin
module TableOfContentsFilter
def toc_only(html)
return html unless toc_enabled?
return '' unless toc_enabled?

::Jekyll::TableOfContents::Parser.new(html, toc_config).build_toc
end
Expand Down

0 comments on commit c2b783c

Please sign in to comment.