# File lib/jekyll/converters/markdown.rb, line 58 def convert(content) setup @parser.convert(content) end
# File lib/jekyll/converters/markdown.rb, line 49 def matches(ext) rgx = '^\.(' + @config['markdown_ext'].gsub(',','|') +')$' ext =~ Regexp.new(rgx, Regexp::IGNORECASE) end
# File lib/jekyll/converters/markdown.rb, line 54 def output_ext(ext) ".html" end
# File lib/jekyll/converters/markdown.rb, line 9 def setup return if @setup @parser = case @config['markdown'].downcase when 'redcarpet' then RedcarpetParser.new(@config) when 'kramdown' then KramdownParser.new(@config) when 'rdiscount' then RDiscountParser.new(@config) when 'maruku' then MarukuParser.new(@config) else # So they can't try some tricky bullshit or go down the ancestor chain, I hope. if allowed_custom_class?(@config['markdown']) self.class.const_get(@config['markdown']).new(@config) else Jekyll.logger.error "Invalid Markdown Processor:", "#{@config['markdown']}" Jekyll.logger.error "", "Valid options are [ #{valid_processors.join(" | ")} ]" raise Errors::FatalException, "Invalid Markdown Processor: #{@config['markdown']}" end end @setup = true end
Generated with the Darkfish Rdoc Generator 2.