mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 17:28:29 -05:00
Added support for inline TOCs with RDiscount
This commit is contained in:
committed by
Tom Preston-Werner
parent
e29490c1c6
commit
f5b2acf8cd
@@ -117,7 +117,12 @@ module Jekyll
|
||||
}).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
|
||||
|
||||
Reference in New Issue
Block a user