lib/jekyll/converters/markdown.rb in jekyll-0.6.2 vs lib/jekyll/converters/markdown.rb in jekyll-0.7.0

- old
+ new

@@ -11,10 +11,13 @@ # Set the Markdown interpreter (and Maruku self.config, if necessary) case @config['markdown'] when 'rdiscount' begin require 'rdiscount' + + # Load rdiscount extensions + @rdiscount_extensions = @config['rdiscount']['extensions'].map { |e| e.to_sym } rescue LoadError STDERR.puts 'You are missing a library required for Markdown. Please run:' STDERR.puts ' $ [sudo] gem install rdiscount' raise FatalException.new("Missing dependency: rdiscount") end @@ -65,10 +68,10 @@ def convert(content) setup case @config['markdown'] when 'rdiscount' - RDiscount.new(content).to_html + RDiscount.new(content, *@rdiscount_extensions).to_html when 'maruku' Maruku.new(content).to_html end end end