lib/jekyll/converters/markdown.rb in jekyll-3.1.0.pre.beta1 vs lib/jekyll/converters/markdown.rb in jekyll-3.1.0.pre.rc1

- old
+ new

@@ -5,11 +5,11 @@ highlighter_suffix "\n" safe true def setup return if @setup - if (!@parser = get_processor) + unless (@parser = get_processor) Jekyll.logger.error "Invalid Markdown processor given:", @config["markdown"] Jekyll.logger.info "", "Custom processors are not loaded in safe mode" if @config["safe"] Jekyll.logger.error "", "Available processors are: #{valid_processors.join(", ")}" raise Errors::FatalException, "Bailing out; invalid Markdown processor." end @@ -17,13 +17,13 @@ @setup = true end def get_processor case @config["markdown"].downcase - when "redcarpet" then return RedcarpetParser.new(@config) - when "kramdown" then return KramdownParser.new(@config) - when "rdiscount" then return RDiscountParser.new(@config) + when "redcarpet" then return RedcarpetParser.new(@config) + when "kramdown" then return KramdownParser.new(@config) + when "rdiscount" then return RDiscountParser.new(@config) else get_custom_processor end end @@ -35,15 +35,15 @@ %W(rdiscount kramdown redcarpet) + third_party_processors end # Public: A list of processors that you provide via plugins. # This is really only available if you are not in safe mode, if you are - # in safe mode (re: Github) then there will be none. + # in safe mode (re: GitHub) then there will be none. def third_party_processors self.class.constants - \ - %w[KramdownParser RDiscountParser RedcarpetParser PRIORITIES].map( + %w(KramdownParser RDiscountParser RedcarpetParser PRIORITIES).map( &:to_sym ) end def extname_list @@ -54,10 +54,10 @@ def matches(ext) extname_list.include?(ext.downcase) end - def output_ext(ext) + def output_ext(_ext) ".html" end def convert(content) setup