Skip to content

Commit

Permalink
Added support for inline TOCs with RDiscount
Browse files Browse the repository at this point in the history
  • Loading branch information
Michishige Kaito authored and mojombo committed Apr 23, 2012
1 parent e29490c commit f5b2acf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/jekyll/converters/markdown.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ def convert(content)
}).to_html
end
when 'rdiscount'
RDiscount.new(content, *@rdiscount_extensions).to_html
rd = RDiscount.new(content, *@rdiscount_extensions)
html = rd.to_html
if rd.generate_toc and html.include? @config['rdiscount']['toc_token']
html.gsub! @config['rdiscount']['toc_token'], rd.toc_content
end
html
when 'maruku'
Maruku.new(content).to_html
end
Expand Down

0 comments on commit f5b2acf

Please sign in to comment.