rescue block for the method and added redcarpet as option for parser

This commit is contained in:
Parker Moore 2013-04-13 02:13:50 +02:00
parent 3bc497c1c9
commit a971fec801
2 changed files with 21 additions and 23 deletions

View File

@ -19,7 +19,7 @@ module Jekyll
MarukuParser.new @config
else
STDERR.puts "Invalid Markdown processor: #{@config['markdown']}"
STDERR.puts " Valid options are [ maruku | rdiscount | kramdown ]"
STDERR.puts " Valid options are [ maruku | rdiscount | kramdown | redcarpet ]"
raise FatalException.new("Invalid Markdown process: #{@config['markdown']}")
end
@setup = true

View File

@ -3,7 +3,6 @@ module Jekyll
class Markdown
class RedcarpetParser
def initialize(config)
begin
require 'redcarpet'
@config = config
@redcarpet_extensions = {}
@ -28,7 +27,6 @@ module Jekyll
STDERR.puts ' $ [sudo] gem install redcarpet'
raise FatalException.new("Missing dependency: redcarpet")
end
end
def convert(content)
@redcarpet_extensions[:fenced_code_blocks] = !@redcarpet_extensions[:no_fenced_code_blocks]