Added support for inline TOCs with RDiscount
This commit is contained in:
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
|
||||
|
|
Loading…
Reference in New Issue